Reputation: 6814
I want to redirect this url :
www.example.com/index.php?cn=us
to
www.example.com/us/
is it possible in htaccess? and how?
Upvotes: 0
Views: 667
Reputation: 934
Try this:
RewriteEngine On
RewriteRule ^([a-z]{2})/?$ index.php?cn=$1
And this shows this works with any two letter country code
index.php
<?php
echo $_GET['cn'];
?>
Upvotes: 3