Web Hosting Talk







View Full Version : Make URL Case-Insensitive


Bee
09-26-2003, 03:10 PM
www.test.com/Abc is the physical directory and I want www.test.com/abc to go there too. Can it be done without using META redirect? Thanks!

JTY
09-26-2003, 03:18 PM
What platform is the server? And, what web server software?

Bee
09-26-2003, 03:21 PM
Linux/Apache

eBoundary
09-26-2003, 04:41 PM
Edit your httpd.conf and add an alias for the the directory.

Alias /abc /path/to/Abc

You need to add ths into the virtual host entry for the domain you whish to alias.

http://httpd.apache.org/docs/mod/mod_alias.html

Bee
09-29-2003, 06:18 PM
There are a lot of URLs I need to redirect and more to come. Would it be more scalable to use mod_rewrite?

http://httpd.apache.org/docs/misc/rewriteguide.html

For example, if a visitor type in http://blah.com/interest/games (all lowercase), I want to send him to http://blah.com/Interest/Games (actual directory).

Another example, if a visitor type in http://blah.com/interest/business, I want to send him to http://blah.com/Interest/Business.

Can someone help me construct the mod_rewrite line to do the above universally? I'm assuming using regular expression.

Thanks!