Hey!
Does anyone know how to create rewrite rules to change:
�link.html?hl=en� to �/en/link.html�
�link.html?hl=jp� to �/jp/link.html�
�link.html?hl=es� to �/es/link.html�
etc?
Where "link.html" changes based on the page request?
Hey!
Does anyone know how to create rewrite rules to change:
�link.html?hl=en� to �/en/link.html�
�link.html?hl=jp� to �/jp/link.html�
�link.html?hl=es� to �/es/link.html�
etc?
Where "link.html" changes based on the page request?
To clarify:
I want to change this:
http://www.unix.com/?hl=ja
to
http://www.unix.com/ja/
and, for example:
http://www.unix.com/index.html?hl=es
to:
http://www.unix.com/es/index.html
For all translation links on the site that use ?hl=xx
OK, we solved this problem a few days ago. Too simple, LOL.
RewriteEngine on
RewriteRule ^(.*)\?hl=ja http://www.unix.com/ja/$1 [L,R=301]
And generically:
RewriteEngine on
RewriteRule ^(.*).html\?hl=(.*)$ http://www.unix.com/$2/$1.html [L,R=301]
And the other way
RewriteEngine on
RewriteRule ^ja/(.*)$ http://www.site.com/$1?hl=ja [L,R=301]