Msg#: 4468097 posted 3:55 am on Jun 22, 2012 (gmt 0)
On my site, a user will get the 404 page, but the http error code is 301, Moved Permanently.
301 is not an error; it's simply a response. Do you have an ErrorDocument line in your htaccess? What does it say?
:: business with crystal ball here ::
1. why does a user see a custom 404 page? Is it because I haven't defined a 301 customised page?
Since a 301 is not an error-- though it might be the result of a mistake-- when would anyone ever see a 301 page if it existed? The essence of a Redirect, whether 302 or 301, is that you get Redirected to another actual page. If you get redirected to a nonexistent page, the 301 at the first location will be followed by a 404 at the second location.
That seems much more generic than it needs to be. It allows users to request any page with any of four extensions: shtml html shtm htm
Unless your site is so enormous that you simply have to cheat a little, you should only be redirecting from the form the URL really used to have. And I find it hard to believe that you used all four concurrently. Maybe different extensions in different directories?
Msg#: 4468097 posted 1:35 pm on Jun 22, 2012 (gmt 0)
If you had changed to extensionless URLs when changing to PHP you would never need to add more redirects with each technology change, only amend internal rewrites to map the same old URLs to the new server internals.