Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.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 wordpress htaccess mod_重写列表_Php_Wordpress_Apache_.htaccess_Mod Rewrite - Fatal编程技术网

Php wordpress htaccess mod_重写列表

Php wordpress htaccess mod_重写列表,php,wordpress,apache,.htaccess,mod-rewrite,Php,Wordpress,Apache,.htaccess,Mod Rewrite,我使用WordPress,并有以下链接: http://test.example.com/listing/?category_type=Cake&city=Ahmedabad 我想要这个: http://test.example.com/Cake/Ahmedabad/ 我尝试将此添加到。但是 RewriteEngine On RewriteRule ^([^/]*)/([^/]*)$ /listing/?category_type=$1&city=$2 [L] 你能帮我吗?

我使用WordPress,并有以下链接:

http://test.example.com/listing/?category_type=Cake&city=Ahmedabad
我想要这个:

http://test.example.com/Cake/Ahmedabad/
我尝试将此添加到。但是

RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /listing/?category_type=$1&city=$2 [L]

你能帮我吗?

重写规则应该是,试试下面的

RewriteRule ^listing/([^/]*)/? /listing/?category_type=$1&city=$2 [QSA,L]