Overriding url filename changing in Apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_outlook_0507


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux