homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

mod speling only working for one folder at a time
mod_speling doesn't seem to be working correctly

 5:44 pm on May 24, 2008 (gmt 0)

We just moved our website to a new server running Apache 2.2 and php 5. Prior to the move, mod_speling worked just fine. Now, however, it only seems to work if the only the right most file/folder needs to be fixed. What we mainly use it for is capitalization:

This is our correct URL:


The following cases work fine because only the right most file needs to be modified:

http://www.example.com/folder_one/ redirects to http://www.example.com/Folder_One/

http://www.example.com/Folder_One/folder_two redirects to http://www.example.com/Folder_One/Folder_Two

But these give me a 404:


Any help at all will be greatly appreciated!


[edited by: jdMorgan at 11:37 pm (utc) on May 24, 2008]
[edit reason] Use example.com please. [/edit]



 11:36 pm on May 24, 2008 (gmt 0)

As documented [httpd.apache.org], mod_speling corrects only single or minor errors.

Best practice to avoid this problem --and the huge problem you'll realize when you try to correct this with mod_rewrite-- is to always use all-lowercase filepaths. If you have access to the server config, and use a RewriteMap to implement the tolower server function, you can mix case on URLs, but not on filepaths.


Receptional Andy

 12:04 am on May 25, 2008 (gmt 0)

mod_speling corrects only single or minor errors

But it will usually fix casing pretty well, including stuff like www.example.com/test/folder-name/ to /Test/Folder_Name/. I wonder if something else might be at work here.


 12:08 am on May 25, 2008 (gmt 0)

Yes, it is to my understanding that mod_speling will only fix one spelling mistake, but it should fix any and all capitalization inconsistencies.

Anyone else have any ideas?


 9:42 pm on May 27, 2008 (gmt 0)



 8:14 pm on May 29, 2008 (gmt 0)

Looks like my SA found the issue. Apparently, we need to turn on the directive acceptpathinfo mod_speling to kick in. We are going to test that out now.

Receptional Andy

 8:16 pm on May 29, 2008 (gmt 0)

Thanks for keeping us up to date, suga, and please let us know if that works :)


 8:20 pm on May 29, 2008 (gmt 0)

Any part of /folder_one/folder_two/index.html that does not actually exist as a file or directory probably won't be corrected by mod_speling. If any part of that path is virtual, then it'll be up to the script that handles it (generates the pages at that level) to correct the path.


[edited by: jdMorgan at 8:22 pm (utc) on May 29, 2008]


 8:33 pm on May 29, 2008 (gmt 0)

Ok, everything seems to be working now with acceptpathinfo set. jdMorgan, the issue was simply capitalization, so the assumption was that all files and directories exist.


 8:36 pm on May 29, 2008 (gmt 0)

Hmm... That's inconsistent with the function of AcceptPathInfo [httpd.apache.org].

But anyway, glad you got it working!


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved