Server 404 error shown instead of invoking Drupal for certain file extensions

Created on 7 June 2019, about 5 years ago
Updated 3 January 2024, 6 months ago

It seems since Drupal 8.7 if you access certain file extensions that don't exist as files on the server show the webserver 404 error rather than invoking drupal to handle the 404

E.g. on a standard install if you try accessing /blah.php /blah.html /blah.xml or you will get redirected to Drupal's 404 page.

But i've found alot of URLs that appear to instead show the standard apache 404 error page .e.g:
/blah.txt
/blah.jpg

And the reason I found this is because I'm rebuilding a website in Drupal that was .asp pages. So i'm finding any url that existed on the old site is not invoking Drupal's standard 404 page e.g.:

/index.asp
/blah.asp

Interestingly if I add a redirect via the redirect module that does get picked up. So I guess that shows Drupal is getting invoked and that redirect is getting processed somewhere along the drupal bootstrap process. But for any url that doesn't exist and doesn't have a redirect is failing to show the standard drupal 404

I've tried the same URLs on websites running 8.6 and this issue doesn't happen and the drupal 404 is shown. I've also tried uninstalling the redirect module to rule that out but that also didn't resolve it.

πŸ’¬ Support request
Status

Closed: works as designed

Version

11.0 πŸ”₯

Component
BootstrapΒ  β†’

Last updated 9 days ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom maseyuk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024