Hi,

I'd like to know the diffrence of handling of 404 and 403 between Drupal's admin settings and my hand craft .htaccess file. What would happen if I use both?

My entire domain is mostly Drupal, but I have a few folders for webstats, personal webmail and secret backup files.

Any help would be appreciated.

Comments

styro’s picture

If a request triggers a 404 or 403 in Apache, Drupal won't even get run. You will get the Apache error, and Drupal won't know anything about the request.

If Apache OKs it and sends the request to Drupal, then Drupal is free to decide whether or not it creates a 404 or 403 error based on its own settings.

All normal Drupal requests go through index.php, so if Apache ends up supplying a 404 error (ie it can't find index.php) then your site is probably broken. For a request that does make it to index.php, Drupal will serve up a 404 if it can't match the given URL to something in it's database eg nodes, modules, path aliases etc. As far as Apache is concerned, the request initially succeeded - ie index.php served up some content, even if it was an error message and Drupal ended up changing the HTTP code to a 404.

If you turn off clean urls it would probably be a lot more obvious what is happening.

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal

takaakikato’s picture

Thank you very much for your detaled explanation. Now I fully understand it.

Thanks,

SC