Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- index.php redirect breaking 404 pages.


g1smd - 12:42 am on Nov 22, 2012 (gmt 0)


Place a blank line after each RewriteRule so you can see each ruleset (the rule and its associated conditions) more clearly.

Apache can send it's own 404 response only when it fails to find a file on the hard drive to handle the request. In this case it always finds a file: index.php (because you have rewritten the request and are now telling Apache to handle the request by serving the index.php file) and so Apache's work is done and there's no error in its part of the operation.

The PHP script should be programmed to return the error 404 HTTP status code and a human readable error message if there is no content to deliver for the current URL request.

Change the order of your redirecting rulesets around. The index redirect ruleset needs to be listed before the non-www/www redirect ruleset.


Thread source:: http://www.webmasterworld.com/apache/4520914.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com