...

View Full Version : Capitals in web folder's name



Lleoun
03-31-2008, 10:30 AM
Hi all,

I want to write in my browser:

http://www.mywebpage.com/myfolder
or
http://www.mywebpage.com/Myfolder

or any combination of capital and low case letters in the word myfolder.

Right now, myfolder in my web server is written all low case, and if I try to write the address with a capital letter in the word myfolder the browser shows a not found error.

How can I solve this??

Thanks in advance!

mlseim
03-31-2008, 04:21 PM
ONLY use small letters for your directories (folders) ...

Then, use .htaccess to convert any Capital letters to small,
so people could type whatever they wanted, and the folder
would open properly.

Example:
myfolder

People could enter: Myfolder, MyFolder, MYFOLDER, etc.
It would not matter.
But the REAL folder is all small letters only.

Here's the .htaccess part:
RewriteEngine on
RewriteMap upper2lower int:tolower
RewriteRule ^/(.*)$ /${upper2lower:$1}

EDIT:
More examples:
RewriteRule ^([^A-Z]*[A-Z].*)$ http://www.yoursite.com/${lowercase:$1} [R=301,L]

but under condition that your httpd.conf has lowercase function enabled: RewriteMap lowercase int:tolower


Use Google to search for other .htaccess tutorials.

Spookster
04-01-2008, 06:21 AM
The above post assumes your server is running Apache web server. If you are running a Windows server with IIS the above post will not apply.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum