Welcome to WebmasterWorld Guest from 54.167.82.170

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

mod speling only working for one folder at a time

mod_speling doesn't seem to be working correctly

     

suga

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

5+ Year Member



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:

http://www.example.com/Folder_One/Folder_Two/index.html

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:

http://www.example.com/folder_one/folder_two/index.html
http://www.example.com/folder_one/Folder_Two

Any help at all will be greatly appreciated!

Thanks.

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

jdMorgan

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

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

Jim

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.

suga

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

5+ Year Member



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?

suga

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

5+ Year Member



anyone?

suga

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

5+ Year Member



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 :)

jdMorgan

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

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

Jim

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

suga

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

5+ Year Member



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.

jdMorgan

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

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

But anyway, glad you got it working!

Jim

 

Featured Threads

Hot Threads This Week

Hot Threads This Month