Forum Moderators: phranque
I've recently started playing around with htaccess, as I decided to make a custom 404 page and at the same time I wanted to rename some of my pages (from blue.shtml to blue_widget.shtml)
I started with about 5 pages with 301's and the 404. I then changed some more pages and added them as 301's. These are NOT working, if I try the old page name in the url, it just brings up the 404 page. All 5 of the old 301's still work fine though. The code is exactly the same for every redirect I really can't understand it. When I header check the new 301's, they are returned as 302 Found, and bring up the 404 page. Here is the code:
redirect 301 blue.shtml [blahblah.co.uk...]
ErrorDocument 404 [blahblah.co.uk...]
I believe you may find your answer in your other thread [webmasterworld.com]. However, I want to point out that your ErrorDocument format is incorrect, and may lead to major problems with your listing in search engines. The code as you have written it, will return a 302-Found (Moved Temporarily) redirect for any page which is missing on your server, instead of the desired 404-Not Found.
The correct format is
ErrorDocument 404 /404error.shtml
Jim