Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.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 使用.htaccess-opencart项目重写URL_Php_.htaccess_Mod Rewrite_Opencart - Fatal编程技术网

Php 使用.htaccess-opencart项目重写URL

Php 使用.htaccess-opencart项目重写URL,php,.htaccess,mod-rewrite,opencart,Php,.htaccess,Mod Rewrite,Opencart,我正在寻找以下URL重写规则的解决方案 网址:http://localhost/mysite/abc/index.php?route=product/category&path=1 这必须重写为 http://localhost/mysite/index.php?route=product/category&path=1&store=abc 我试过以下几种方法 RewriteRule ^([^/]*)/([^/]*)$ $2&store=$1 [L] 但它最终出现在/

我正在寻找以下URL重写规则的解决方案

网址:http://localhost/mysite/abc/index.php?route=product/category&path=1

这必须重写为

http://localhost/mysite/index.php?route=product/category&path=1&store=abc
我试过以下几种方法

RewriteRule ^([^/]*)/([^/]*)$ $2&store=$1 [L]
但它最终出现在/mysite/index.php&store=abc中


无法获取完整的$2

检查有关QSA的mod_重写文档flag@zerkms是的,我也试过。但是再一次得到/mysite/index.php&store=abcs你到底是怎么尝试的。@zerkms我对htacees非常陌生。。这就是我试过的。重写规则^.+/.+$$2[QSA,L],你怎么知道它最终会变成/mysite/index.php&store=abc?