Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.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
.htaccess 使用htaccess重定向编辑参数_.htaccess_Prestashop - Fatal编程技术网

.htaccess 使用htaccess重定向编辑参数

.htaccess 使用htaccess重定向编辑参数,.htaccess,prestashop,.htaccess,Prestashop,一些URL在PrestaShop中的单个产品页面上具有参数?content_only=1。我想将这些参数重定向到?content\u only=0 URL结构如下所示: 这应该改为 第一个/后面是类别,第二个/后面是产品的名称和ID。这应该不会受到影响。 谢谢。你可以试试这个规则: RewriteCond %{QUERY_STRING} ^(.*)content_only=1(.*)$ RewriteRule ^(.*)$ /$1?%1content_only=0%2 [L,R=301]

一些URL在
PrestaShop
中的单个产品页面上具有参数
?content_only=1
。我想将这些参数重定向到
?content\u only=0

URL结构如下所示: 这应该改为

第一个
/
后面是类别,第二个
/
后面是产品的名称和ID。这应该不会受到影响。 谢谢。

你可以试试这个规则:

RewriteCond %{QUERY_STRING} ^(.*)content_only=1(.*)$
RewriteRule ^(.*)$ /$1?%1content_only=0%2 [L,R=301]