Dear All, trying to figure out this but no luck.
Want to rewrite and beautify this specific ...?ln=zh-CN to /cn/...
With the help of a genius @ StackOverflow(Laurence Gonsalves) im almost there!
But stuck here:
/it/somepage goes nicely /somepage?ln=it
/de/somepage goes nicely /somepage?ln=de
/fr/somepage goes nicely /somepage?ln=fr
/cn/somepage but this gives 404 error!
/somepage?ln=zh-CN works ofcourse fine
# exception for Chinese version /cn/somepage
RewriteRule ^zh-CN/(.*) /$2?ln=zh-CN [L]
RewriteRule ^cn/(.*) /$2?ln=zh-CN [L]
# redirect all /XX/somepage goes to /somepage?ln=XX
RewriteRule ^([a-z][a-z])/(.*) /$2?ln=$1 [L]
The second part works perfectly! The first part doesnt do the work well for that one and only exception zh-CN... What is being overlooked here? All clues or tips will be blessed with feminine attentions in our afterlife, i'm so sure!