Welcome Guest, Not a member yet? Register   Sign In
rewrite URL to lower case on godaddy


I want that when someone types in the URL in uppercase then it should be converted to lower case.

In the facebook if you type upper case URL then also it converts it into lower case and then shows us the page.

How to do this in htaccess??

People please reply don't just view and go away....i need this

[eluser]TWP Marketing[/eluser]
If I knew the answer I would post it. Instead, I did a websearch using "htaccess lower case" and found a huge number of responses to this question. Rather than repost one of them here I will give you the first one I found and you can read it for yourself. If that doesn't work there are many more hits if you do this search...

i have tried this and it did not work for me...... :-(

You must not have the RewriteMap apache module installed, which is required to do what you are wanting via htaccess.

This can easily be done in a few lines at the top of your index.php, before CI loads.

$server_url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if ($server_url !== strtolower($server_url))
  header('Location: http://' . strtolower($server_url), TRUE, 301);
Then it should work on any server.

will this work if user changes URL from browser to uppercase then what??

Do you understand PHP? It isn't that much code and should be pretty self explanatory.

Thanks this worked....!!

Theme © iAndrew 2016 - Forum software by © MyBB