我一直在使用以下脚本来获取友好的 url,它在 apache 1.3 中运行良好。我们刚刚升级到 apache 2.2.17,它似乎不再工作了。
有什么需要调整才能在 2.2 中工作吗?
mysite.com/products?BRAND=ADIDAS&VENDORCODE=581 (ORIGINAL URL)
mysite.com/products/ADIDAS/581 (FRIENDLY URL)
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*/)?products/([^/]+)/([0-9]+)/?$ $1/products?BRAND=$2&VENDORCODE=$3 [PT,L]
RewriteRule ^(.*/)?products/([^/]+)/([^/]+)/([0-9]+)/?$ $1/products?BRAND=$2&VENDORCODE=$3&offset=$4 [PT,L]
RewriteRule ^(.*/)?DeptItems/([^/]+)/([0-9]+)/?$ $1/DeptItems?BRAND=$2&catCode=$3 [PT,L]
RewriteRule ^(.*/)?DeptItems/([^/]+)/([^/]+)/([0-9]+)/?$ $1/DeptItems?BRAND=$2&catCode=$3&offset=$4 [PT,L]
RewriteRule ^(.*/)?itemdetail/([^/]+)/([^/]+)/?$ $1/itemdetail?BRAND=$2&desc1=$3 [PT,L]