httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harry Spier" <>
Subject [users@httpd] Overriding url filename changing in Apache
Date Thu, 17 May 2007 04:01:42 GMT
Dear list members,

I have a website on a shared hosting Apache Linux server.

On that server, Apache is set so that if a url is sent to a domain with a 
file name that doesn't exist but another filename exists on that domain with 
one letter different from the url, it changes the url to the existing file 
name and accesses it instead of giving a 404 error.  I believe (but I'm not 
sure) that this is because mod-speling is enabled on that Apache server. 
This is the default behaviior on the shared hosting server and they wont 
change it.

I need to override that behavior in my domain so that a url to a 
non-existent file will always give a 404 error. (My website is a digital 
library of thousands of books where the filenames are a catalogue number. I 
can't change the filenames.) Is there anyway I can use my .htaccess file to 
override the servers changing the url to a similar file name (which of 
course displays the wrong book) and force it to give a 404 error for all 
non-existent files.

I've tried adding a statement:
ErrorDocument 404 404err.htm
to my .htaccess (where 404err.htm prints file not found)

But the server still serves up a file with a similar name instead of giving 
a 404 error.

Thanks in advance,
Harry Spier

Like the way Microsoft Office Outlook works? You’ll love Windows Live 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message