P粉1666758982023-08-31 11:18:35
It sounds like you have mod_speling
a> (a l
) enabled in the server configuration.
mod_speling
Scan directories when requesting files that do not exist. If there is a "close match" (e.g. 1 character difference), a 301 redirect will be issued to the file. (Although if there is more than 1 "close match" the user will be shown a list of available files!)
You can disable this behavior in .htaccess
using the following command:
CheckSpelling Off
This option is disabled by default, so it needs to be explicitly enabled elsewhere in the server configuration. (If you have access, it's best not to enable it in the first place.)
Please note that since a 301 (permanent) redirect is issued, you will need to clear your browser (and any intermediate) cache before testing.
Aside: CheckCaseOnly
directive (part of mod_speling) is more commonly used to limit spelling corrections to only case, ie. Enable case-insensitive URLs.