magento:某些 htaccess 重定向不起作用

magento : some htaccess redirection doesn't work

使用 magento 1.7 FR,我在 htaccess 中有一些重定向规则,但并非所有规则都有效,我找不到原因:

Options +FollowSymLinks
RewriteEngine on

# This is working
Redirect 301 /blog/conseils-literie/literie-et-matelas-pirelli.html http://example.com/produits/literie.html
Redirect permanent /catalogues/ http://example.com/

# This is not working !
Redirect 301 /produits.html?marque=32 http://example.com/32/bultex.html
# I replaced it with this but no way !
RewriteCond %{HTTP_HOST} ^example.com/produits.html?marque=32
RewriteRule ^(.*)$ http://example.com/32/bultex.html [R=301,L]

我确定没有从后端设置 URL 重定向!

这在我的服务器上运行良好:

RewriteCond %{THE_REQUEST} /produits\.html\?marque=([^&\s]+) [NC]
RewriteRule ^ /%1/bultex.html? [NE,NC,R,L]

删除或注释掉 .htaccess 中的重定向行,并将此规则放在那里。不要从目标 url 的末尾删除 ? 否则查询字符串“?marque=32”将附加到它并且 url 将看起来像:

/32/bultex.html?marque=32