Trilight Zone Forum Index Trilight Zone
Privacy & Anonymity is our specialty !
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Forcing Apache to correct misspellings of URL

 
Post new topic   Reply to topic    Trilight Zone Forum Index -> Linux
Author Message
thedark
Second Lieutenant


Joined: 30 Jul 2005
Posts: 1074

PostPosted: Sun Jul 31, 2005 10:11 am    Post subject: Forcing Apache to correct misspellings of URL Reply with quote

Apache has mod_speling for automatic URL spell-correction. For example when on this site you can request the page using following format:

http://cyberciti.biz/index is same as use URL http://cyberciti.biz/index.php .

This module help visitor to get correct content instead of error 404 – document not found and you can also omit file extension such as .pl, .php, .html etc in urls references. It attempts to correct misspellings of URLs that users might have entered, by ignoring capitalization and by allowing up to one misspelling. This must be configured on massive web hosting server by ISP and web hosting service providers so the hosting customer can take advantage of this module.

Following steps demonstrates how to activate this module under Debian GNU/Linux:

A) Open your Apache modules configuration file:
# vi /etc/apache-perl/modules.conf

B) Append following line to this file:
LoadModule speling_module /usr/lib/apache/1.3/mod_speling.so

C) Save the file.

D) This module need to be configured via httpd.conf via CheckSpelling directive. You can configure it for entire site, particular virtual host or even via .htaccess file. Open your /etc/apache-perl/httpd.conf and add followint line in server config context:

CheckSpelling on

E) Restart the apache:
# /etc/init.d/apache-perl restart

Please note that above steps are same under FreeBSD/Solaris for Apache web server except for file location i.e. httpd.conf and modules.conf. Please refer man page for more info.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Trilight Zone Forum Index -> Linux All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group