Apache mod_speling

Apache mod_speling

Posted by: Starbuck
Posted on: 2008-02-01 05:49:00

I wanted to see if we had mod_speling so I put this into .htaccess in one of my directories:

<IfModule mod_speling.c>
CheckSpelling On
</IfModule>

No joy. My goal is to allow users to see MyKewlPage.htm using mykewlpage.htm.

Any hints? Does DH load mod_speling?
Thanks!!

Re: Apache mod_speling

Posted by: scjessey
Posted on: 2008-02-01 06:47:00

Use a basic redirect in your .htaccess file instead:

Redirect 301 /MyKewlPage.htm http://yourdomain.com/mykewlpage.html

Note: I changed .htm to .html to make you look less like a Microsoft junkie!

-- si-blog --

Re: Apache mod_speling

Posted by: Starbuck
Posted on: 2008-02-01 14:01:00

Thanks for that but I'd rather not have to crete a redirect for all possible permutations of casing. The only reason I use camel case is for aesthetics, compared to my_kewl_page.htmL. :) So I'm still hoping to make use of mod_speling.

It's ironic that frugality of .htm vs .html pegs a guy as a Microsoft junkie when it's the Microsoft guys that seem to prefer the verbosity of Visual Basic, and *nix guys that favor the brevity of commands like ps, awk, vi, and sed. Heck, I could have said My Kewl Page.asp. ;)

Re: Apache mod_speling

Posted by: scjessey
Posted on: 2008-02-01 15:17:00

In reply to:

Thanks for that but I'd rather not have to crete a redirect for all possible permutations of casing.


Then use mod_rewrite with a bit of rewrite map trickery instead. I think this might work, but you'll have to check it because my mod_rewrite experience is limited:

RewriteEngine on
RewriteBase /
RewriteMap insensitive tolower:
RewriteRule ^[\/]*(.*)$ /${insensitive:$1} [R,L]

-- si-blog --

Tags: htaccessapachehtaccessapache