Subscribe to the RSS feed and follow me on Twitter

htaccess file - Need Some Help

UPDATE: - Solved, thanks to Ryan Irelan!

If you are knowledgeable about .htaccess files I could use some quick help.

Basically, I just need to do what I perceive as a simple (permanent) redirect/rewrite. We are moving some archives and I need requests coming in for:

http://pa.gigavox.com/shows/detailXXXX.html
to go to
http://podcastacademy.com/shows/detailXXXX

The XXXX represents a 4 number sequence.

I have this in the subdomain’s (pa.gigavox.com) root but it is not working.

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} pa.gigavox.com
RewriteRule ^/shows/detail(.*).html http://podcastacademy.com/shows/detail$1 [R=301,L]

Any ideas? Post a comment or I can be contacted at: michael AT mwgblog.com

Thanks!

Here is the solution via Ryan:
# Redirects for old posts
RewriteEngine On
RewriteBase /
RewriteRule ^shows/detail(.*).html http://podcastacademy.com/shows/detail$1 [R=301,L]

Apparently there was an extra “/” in there. Thanks Ryan!

4 Responses to “htaccess file - Need Some Help”


  1. Gravatar Icon 1 NicoleSpag Dec 27th, 2007 at 6:03 pm

    Hey Michael,

    I had to do a few redirects recently for our business site and used htaccess (and it works great). I found everything I needed to know about redirects from this post. http://www.stevenhargrove.com/redirect-web-pages/ Hope that helps!

    Nicole

  2. Gravatar Icon 2 Ryan Irelan Dec 27th, 2007 at 7:00 pm

    Remove the forward slash on Line 4 so it reads

    RewriteRule ^shows/detail(.*).html http://podcastacademy.com/shows/detail1 [R=301,L]

    That should work!

  3. Gravatar Icon 3 Michael Dec 27th, 2007 at 8:30 pm

    Thanks Ryan - that did it!

    Michael

  1. 1 Hunter S. Thompson - Need the Shirt at MWGblog pingback on Dec 29th, 2007 at 6:03 am

Leave a Reply