I use the following pattern:
http://example/index.php?lang=en
http://example/index.php?lang=es
http://example/index.php?lang=zh-tw
http://example/index.php?lang=zh-cn
And I use the following mod_write rule:
RewriteEngine on
RewriteRule ^([a-z]{2}(-[A-Z]{2})?)/(.*) $3?lang=$1 [L,QSA]
With that rule I can use the following URLs which redirect me to the URLs above (the original ones):
http://example/en/index.php
http://example/es/index.php
http://example/zh-cn/index.php
http://example/zh-tw/index.php
I wish I could just type:
http://example/en
http://example/es
http://example/zh-cn
http://example/zh-tw
To access the index pages...
and type this:
http://example/en/thanks
http://example/es/thanks
http://example/zh-cn/thanks
http://example/zh-tw/thanks
to enter a thanks.php
file I have.
Any suggestions to get that result?
(I think this should be quite common. Almost every professional website has pages in this fashion: example/section).