搜索者的网址是:
http://www.domain.com/index.php?category=search&customsearch=true&group=2&ref=&guests=1&rooms=1&city=6265&arrival=1363215600000&departure=1363474800000
但是,我需要将页面翻译成其他语言,并同意网址中的“lang”参数。
..://www.domain.com/index.php?category=search&customsearch=true&group=2&ref=&guests=1&rooms=1&city=6265&arrival=1363215600000&departure=1363474800000**&lang=it**
我希望我可以拨打此表格的网址:
..://www.domain.com/**it**/index.php?category=search&customsearch=true&group=2&ref=&guests=1&rooms=1&city=6265&arrival=1363215600000&departure=1363474800000
......并且参数不会丢失。
可以帮帮我吗?谢谢!
答案 0 :(得分:1)
试试这个
RewriteEngine on
RewriteRule ^index.php?category=(.+)&customsearch=(.+)&group=(.+)&.......&lang=(.+)?$ http://www.domain.com/(LAST $ VALUE)/index.php?category=$1&customsearch=$2&group=$3&..........
类似这样,lang的最后一个索引号将放在(LAST $ VALUE
)