ignore capital letters in address

Status
Not open for further replies.

armin.makovec88

New Member
Messages
7
Reaction score
0
Points
0
Is there any way to make server ignore the capital letters in address bar? It would be really helpful. :)

Thanks in advance.
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
Could you give an example url? I just clicked through your site and there are no uppercase letters in any of your links.

The only thing I could think of about your question is this: linux servers are case sensitive. So index.html, Index.html, and INDEX.html are three different file names to the server. x10hosting runs completely on linux.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
There is a module for Apache, mod_speling that will match requests and files ignoring case (and will 'correct' for one spelling error, ie a request for mipage.html will match the actual file mypage.html). It is not enabled on x10hosting and I doubt that they would enable it (it would break too many things).

The other way, a bit of a hack, would be to use .htaccess to route all requests through a php file, ie FooBar.html would be sent to normalize.php?f=FooBar.html. normalize.php would then look for the file, ignoring case. Then either issue a redirect or include/output the contents of the file. Lot of work.

Easiest is to just make sure all your files are lowercase. Then people will get used to entering URLs in all lowercase and you won't have a problem.
 
Last edited:

armin.makovec88

New Member
Messages
7
Reaction score
0
Points
0
i have sign up to a forum (phpfreaks.com) and since at first i have been testing PHP & JavaScript Real-Time Server clock at adress http://cybital.cu.cc/Clock.php, but after that I changed the name several times and return back to original. But I forget to make first letter capital. Since now I have posted both links (with capital and non-capital), I don't want to make trashy server with both files :) And since my site is still under construction, it would be useful for my future upgrades to it xD.

That's it. However, any help on make one, descalzo, would be appreciated (any tutorial or something. Of course the code itself woulf be ideal, but ...).
Oh, now the right link is http://cybital.cu.cc/clock.php .
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
To redirect a request from Clock.php to clock.php:

In .htaccess add:
Code:
RewriteEngine on
RewriteBase /
RewriteRule Clock.php  clock.php

From now on, make all directories and file names lower case (and do not use spaces in names). Makes life much easier.
 
Status
Not open for further replies.
Top