.htaccess RewriteCond查询字符串条件不起作用

.htaccess RewriteCond查询字符串条件不起作用,.htaccess,mod-rewrite,.htaccess,Mod Rewrite,我试图实现一些URL重写,但遇到了一个问题。查询字符串条件似乎不匹配 示例URL: 这是我写的规则 RewriteCond %{QUERY_STRING} ^ProductCode=(.*)$ RewriteRule (.*) /catalogsearch/result/?q=%1 [R=301,L] 我有另一条几乎相同的规则。你有没有想过为什么这个没有开火

我试图实现一些URL重写,但遇到了一个问题。查询字符串条件似乎不匹配

示例URL:

这是我写的规则

RewriteCond %{QUERY_STRING} ^ProductCode=(.*)$
RewriteRule (.*) /catalogsearch/result/?q=%1 [R=301,L]
我有另一条几乎相同的规则。你有没有想过为什么这个没有开火