0

If I request a non-existent URL, say, /ddddd I get Page not found (as expected). If I do th4 same with an unusual extension /dddd.xcf I also get Page not found.

BUT if I request /ddddd.gif there's an Apache error as opposed to a 404?

I'm guessing this has something to do with security, but can someone clarify this?

1
  • Just .gif, or .jpg/.png/etc too? What about non-existent .js/.css files outside of sites/default/files? What error are you receiving (code and message)? If it's a 500, I'd wager you've just found a bug – Clive Aug 11 '14 at 15:08
3

By default drupal serves a different 404 page to save computational effort if it is matching the following regex:

'/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'

You can configure this in the settings.php (Fast 404 pages) or in the config('system.performance')->get('fast_404.paths');

1
  • Yes, it was this. I was being asked by someone else, and didn't have a D8 installation to hand. So thanks. – Adaddinsane Aug 11 '14 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.