I am trying to get my links to redirect to something a little more search engine friendly but for some reason I am getting a 404 error. What's wrong with this code? Redirect 301 /default.htm http://www.site.com/index.htm Redirect 301 /links.htm http://www.site.com/links/links.htm ErrorDocument 404 http://www.site.com/404.htm RewriteEngine on RewriteRule ^products_2\.htm$ /2/keyword.htm RewriteRule ^products_3\.htm$ /3/keyword.htm RewriteRule ^products_4\.htm$ /4/keyword.htm RewriteRule ^products_5\.htm$ /5/keyword.htm RewriteRule ^products_6\.htm$ /6/keyword.htm Code (markup): Thanks for your help
That's why you are getting 404s -- /2/keyword.htm doesn't exist. It should be the other way around, first what to rewrite, then what to rewrite it into. So, RewriteRule /2/keyword.htm$ /products_2\.htm So, if you type /2/keyword.htm in your browser, the server is going to show products_2.htm