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

[eluser]aniketharshe20[/eluser]
Hello,

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??
#2

[eluser]aniketharshe20[/eluser]
People please reply don't just view and go away....i need this
#3

[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...
http://www.chrisabernethy.com/force-lowe...d_rewrite/
#4

[eluser]aniketharshe20[/eluser]
i have tried this and it did not work for me...... :-(
#5

[eluser]CroNiX[/eluser]
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.

Code:
$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.
#6

[eluser]aniketharshe20[/eluser]
will this work if user changes URL from browser to uppercase then what??
#7

[eluser]CroNiX[/eluser]
Do you understand PHP? It isn't that much code and should be pretty self explanatory.
#8

[eluser]aniketharshe20[/eluser]
Thanks this worked....!!




Theme © iAndrew 2016 - Forum software by © MyBB