Link to home
Start Free TrialLog in
Avatar of webstuck5
webstuck5

asked on

Redirect subfolder but individually redirect files within it in .htaccess

In my .htaccess file I have:

redirect 301 /blog                                    http://www.romancestuck.com/
redirect 301 /blog/2009/06/okay-to-kiss/ http://www.romancestuck.com/articles/news/okay-to-kiss.htm

I got rid of the blog section of my http://www.RomanceStuck.com site so I want to redirect the main blog folder to my site's home page. I also moved some of the blog posts into other areas of my site so I want to redirect those specific blog posts to their new locations. Unfortunately, redirecting the blog folder causes problems with the specific blog post redirects. The line:

redirect 301 /blog/2009/06/okay-to-kiss/ http://www.romancestuck.com/articles/news/okay-to-kiss.htm

ends up redirecting visitors to http://www.romancestuck.com/2009/06/okay-to-kiss/ instead of http://www.romancestuck.com/articles/news/okay-to-kiss.htm

How can I fix this?

Thanks!
Ben Cunningham
ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of webstuck5
webstuck5

ASKER

I thought I had tried putting the general redirection after the specific reduction and it didn't work. It seems to be working now.

Thanks!