g1smd - 10:35 pm on May 8, 2010 (gmt 0) [edited by: g1smd at 10:42 pm (utc) on May 8, 2010]
I get you, but the 404.shtml page is a custom 404 error page and returns a 404 error not found header if done right
example.com/404.shtml may very well return a 404 status code, but the very important point here is that
example.com/filename.html?duff-url-request does not return a 404 response. It returns a 301 redirect to a different URL. The 301 redirect is not a 404 status. The browser isn't told that the URL does not exist. Instead it is told to make a new request for a different URL. When it does so, it is then told that this new URL does not exist.
That is not the same thing and this can be a very dangerous situation, and is one that must be avoided.
The index.php thing, yes I explained that and said if you have index.php as the URL constructor. What I posted above works OK
As posted, the code cannot possibly work. It will only match if both "index.php" AND "index.html" are in the requested URL at the same time.
[edited by: g1smd at 10:42 pm (utc) on May 8, 2010]