Crawlers hitting /%20 can replace the home page with a 404

Created on 21 March 2012, over 13 years ago
Updated 10 September 2024, 10 months ago

Problem/Motivation

When using the IIS web server, Drupal core is caching the 404 page not found error page, if the URL referrer has a space (or %20) at the end. EG. https://example.com/%20

Can't be reproduced on Nginx, or Apache.

Steps to Reproduce:

(from comment #33 )

1) Enable drupal core cache or if already enabled then Clear all your cache.
2) Then visit your homepage_url/%20 (www.website.com/%20) or any URL/%20 before visiting any other page.
you will get 404 page(This depends on your server mostly IIS gets 404)
If you get 404 then only you can reproduce this issue.
3) Then visit your homepage or that URL(entered in 2) You will get 404.

Proposed resolution

Patch: #35

Remaining tasks

* reviews needed
* needs tests
* Possibly update IIS documentation

Original report by rhouse

Original title: "Page not found for home page"

This discussion thread seems to be an unreported bug. It just happened to me. Unlogged in users get a page not found on the home page. Clearing the cache fixes it. Since then I turned off page caching since I cannot afford to have this site down. I don't yet know if the problem will recur.

http://drupal.org/node/1097528

PS: page.module for "Component" is a guess on my part - it could be anywhere.

🐛 Bug report
Status

Needs work

Version

7.0 ⚰️

Component
Cache 

Last updated 12 days ago

Created by

🇦🇺Australia rhouse

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.71.5 2024