我一直在使用下面的腳本來處理友好的url,它在apache 1.3中工作。我們剛剛升級到Apache 2.2.17,它似乎沒有工作了。來自apache 1.3的Mod_ReWrite腳本在2.2中不起作用012
有什麼需要調整的工作在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]
是模塊的mod_rewrite仍處於啓用狀態? – JackLeo 2011-04-15 12:57:18
我該如何檢查? – JonnyD91 2011-04-15 13:00:45
在Linux上'#a2enmod rewrite'不知道它是如何在windows上 – JackLeo 2011-04-15 13:02:20