我想在這裏重寫我的動態網址是關於它的一些信息。動態網站的URL重寫
整個數據來自單個表,沒有其他表創建。 URL重寫在Apache服務器上處於活動狀態。
我目前的URL
http://www.example.com/list.php?city=Mumbai&business_category=Accounting+services
預期網址
http://www.example.com/Mumbai/Accounting-services
我的代碼
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ list.php?city=$1&business_category=$2 [NC,L] # Process product requests
其實看起來不錯。什麼不工作? – colburton
我的網址沒有任何事情發生,它保持不變。 –
您是否期望當前網址被輸入到地址欄時轉換爲預期網址? – RamRaider