Mod rewrite 无法在mod_rewrie中使用多个规则

Mod rewrite 无法在mod_rewrie中使用多个规则,mod-rewrite,Mod Rewrite,我需要用它 重新启动发动机 重写cond%{SERVER\u PORT}^9090$ 重写规则^vendor/([0-9]+).html$ productcategory.iface?操作=类别和catid=$1[L,R] 重写规则^vendor/([0-9]+)([0-9]+).html$ productcategory.iface?操作=产品和产品ID=$2 重写规则^vendor/([0-9]+)([0-9]+)([0-9]+).html$ productcategory.iface?操作

我需要用它

重新启动发动机

重写cond%{SERVER\u PORT}^9090$

重写规则^vendor/([0-9]+).html$ productcategory.iface?操作=类别和catid=$1[L,R]

重写规则^vendor/([0-9]+)([0-9]+).html$ productcategory.iface?操作=产品和产品ID=$2

重写规则^vendor/([0-9]+)([0-9]+)([0-9]+).html$ productcategory.iface?操作=vendet和prodid=$2和venid=$3


但是我使用了这个规则,我在500上发现了一个错误,那就是配置错误,指令中不允许换行。所以试试这个:

RewriteEngine On
RewriteCond %{SERVER_PORT} !^9090$
RewriteRule ^vendor/([0-9]+)\.html$ productcategory.iface?Operation=category&catid=$1 [L,R]
RewriteRule ^vendor/([0-9]+)\([0-9]+)\.html$ productcategory.iface?Operation=product&prodid=$2
RewriteRule ^vendor/([0-9]+)\([0-9]+)\([0-9]+)\.html$ productcategory.iface?Operation=vendet&prodid=$2&venid=$3

请给出一些您希望从pleaseDo重新写入的URL的示例,您是否需要将此条件RewriteCond%{SERVER_PORT}仅应用于第一个规则?如果需要它影响所有规则,则需要在每个规则之前重复它。关于您的问题,您能在Apache日志中看到一些东西吗?