Use mod_speling to fix mis-typed URIs
I just discovered the Apache module mod_speling (yup, one 'l') which is a fantastic way to ensure visitors who mistype URIs get automatically redirected to the correct location.
If mod_speling is compiled on your (Apache only) web server, and you can make config changes using htaccess, the you can add the following lines to your htaccess file to fix mis-spellings:
<IfModule mod_speling.c>
CheckSpelling on
</IfModule>
The ifmodule directive ensures that you won't cause errors on your site if the module is not installed and helps makes your code more portable. Checkspelling On is the directive enabling spell checking, although webmonkey thinks it's SpellCheck on which didn't work for me.
It's now in action on this site, and from an initial evaluation seems pretty nifty. http://andylangton.co.uk/tuff/ becomes http://andylangton.co.uk/stuff/ just as http://andylangton.co.uk/raticles/ becomes http://andylangton.co.uk/articles/. Which, sad as it may be, impresses me greatly.
I'll update this article if I notice anything interesting about the module.
30.04.2007. 20:04
Doris said on 25.11.2007. 23:05
Great articles! I was especially interested in the CSS converter and HTML converter. I'm trying to get as much information on converting my web sites to CSS as possible. My biggest problem is getting my website to work properly. I'm at my wits ends. I created my web sites using a predesigned template and now that I'm learning CSS, it's a total mess. How do you edit the secition of a predesigned template? If you can give me some pointers for editing predesigned templates, it would be appreciated greatly.
Andy said on 09.12.2007. 15:48
Hi Doris,
It's difficult to say without knowing a little more about what type of template you have. If it's from one of the big template websites then the quality can be extremely variable. I've also found that editing other people's CSS, while a good learning exercise can be tricky, especially if they've used any hacks or complex layout techniques.
The CSS converter is, frankly, not fit for purpose. Unfortunately I don't have to time to adequately fix it or rebuild it from scratch. I can only apologies, I'm afraid.
Recent Comments:
Page last (manually) updated: May 01, 2007.
Questions, comments, insults or praise? Have your say: