首页 文章

重定向301 htaccess prestashop

提问于
浏览
1

为prestashop网站创建重定向301并在我的下面代码的htaccess第一行插入所有罚款 . 但是对于类别和产品,htaccess会在不存在的页面上发送所有用户 . 应该使用哪些设置来读取prestashop网址中的所有这些参数 .

#URL rewriting module activation
RewriteEngine on

Redirect 301 /contact-form.php http://sitoweb.eu/
Redirect 301 /category.php?id_category=73 http://sitoweb.eu/

1 回答

  • 0

    要匹配查询字符串,您需要使用RewriteCond和RewriteRule,因为查询字符串不是Redirect指令中匹配的一部分 .

    试试这个:

    RewriteEngine on
    
    RewriteRule ^contact-form\.php$ http://siteweb.eu/ [NC,L,R]
    RewriteCond %{QUERY_STRING} ^id_category=73$
    RewriteRule ^category\.php$ http://siteweb.eu/ [L,R]
    

相关问题