: Can Apache "Correct" URL Case? Let's say I keep every word of file names capitalized. For example, Home.php or MultipleWordTitle.html. Is there any way for Apache to redirect requests for incorrectly-cased
Let's say I keep every word of file names capitalized. For example, Home.php or MultipleWordTitle.html.
Is there any way for Apache to redirect requests for incorrectly-cased URLs to the capitalized pages, preferrably using .htaccess?
Simply rewriting the URL to make the first letter capitalized won't work, since some files have multiple capital letters.
Ideally, I'd like the change to be reflected on the user's side, so it would show up as MultipleWordTitle.html in his/her address bar. It's okay if that can't be done, though.
More posts by @Goswami781
1 Comments
Sorted by latest first Latest Oldest Best
There are many reasons not to ignore the all-lowercase convention but, if you believe you have a good reason for doing so, you can use Apache's mod_speling to ignore case problems in the request and then specify the canonical URL in the document itself, or issue a redirect as LazyOne described.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.