Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 仅解析第一个变量$\u GET with.htaccess_Php_Apache_.htaccess_Mod Rewrite_Url Rewriting - Fatal编程技术网

Php 仅解析第一个变量$\u GET with.htaccess

Php 仅解析第一个变量$\u GET with.htaccess,php,apache,.htaccess,mod-rewrite,url-rewriting,Php,Apache,.htaccess,Mod Rewrite,Url Rewriting,搜索者的URL为: http://www.domain.com/index.php?category=search&customsearch=true&group=2&ref=&guests=1&rooms=1&city=6265&arrival=1363215600000&departure=1363474800000 但是,我需要将de页面翻译成其他语言,并同意url中的“lang”参数 ..://www.domain.com

搜索者的URL为:

http://www.domain.com/index.php?category=search&customsearch=true&group=2&ref=&guests=1&rooms=1&city=6265&arrival=1363215600000&departure=1363474800000
但是,我需要将de页面翻译成其他语言,并同意url中的“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**
我希望我可以调用此表单的url:

..://www.domain.com/**it**/index.php?category=search&customsearch=true&group=2&ref=&guests=1&rooms=1&city=6265&arrival=1363215600000&departure=1363474800000
…并且参数不会丢失

你能帮我吗?谢谢

试试这个

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

谢谢!运行完美!!