我需要用它吗
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
但我使用此规则我发现500错误是错误配置错误
答案 0 :(得分:0)
不允许在指令内换行。所以试试这个:
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