.htaccess problem - Redirects
My site has just recently launched a bunch of new product pages, replacing the old ones
Here is an example of a redirect I want. One going from the old page...redirecting to the new page. I checked google webmaster and said that there was a not found error for the second link.
Redirect 301 /blahblah.html http://www.blahblah.com/blah.html
Redirect 301 /blahblah htt开发者_JAVA技巧p://www.blahblahcom/blah.html
So the .html one is redirecting fine...but the one without the html extension is not. BUT...whats strange is that I have a bunch of redirects from the past that dont use the html ext and work fine, such as:
why this isnt working?
You need to put a slash at the end of any URL without a file extension.
Try this:
Redirect 301 /blah/ http://www.blahblah.com/managed-enterprise-services.html
However, since your customers might not know to put in the trailing slash, you'll also need to generate a rewrite rule to handle the non-slash case:
RewriteRule /blah /blah/ [R]
If you're not using any sort of framework to create your website you'll probably want to Google for some redirect generation software to avoid doing all this by hand, but if you only have a couple of pages then manual generation shouldn't be a big deal.
精彩评论