Originally Posted by
DrByte
When your site jumps to main_page=page_not_found it is a result of the combination of two factors:
a. your configuration setting for Admin->Configuration->Missing Page Check
b. any .htaccess rules you've configured to redirect invalid incoming requests (for files that don't exist on your site and for which no rewrite/redirect rule has been established), such as via the example redirect rule found in the /extras/htaccess_for_page_not_found_redirects.htaccess file
Your webserver's apache access_log and error_log can give you insights into the actual URLs it receives requests for, including the ones it actively rejects.
It is indeed best that the webserver reject the attempt before it ever hits PHP, since that both blocks any bad side-effects and also stops your store from having to waste CPU cycles processing fake requests and running database queries thus slowing down shopping for legitimate users. Of course the side-effect of this is that PHP will never know about those hits and therefore is entirely unable to display any such activity to your PHP application in real-time. That's why the logs exist. It's also why 3rd party services for log-analysis exist.
Bookmarks