View Full Version : Capitals in web folder's name

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

I want to write in my browser:


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!

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.


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}

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.

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.