我使用htaccess的我的原單的網址是URL重寫使用htacces在我的情況
http://www.example.com/products/product_detail.php?url=pro-name
我想要的網址會像這樣
http://www.example.com/products/pro-name
,但我部分地以這樣的URL進行重寫我的網址使用此代碼的.htaccess
http://www.example.com/products/product_detai/pro-name
RewriteRule product_detail/url/(.*)/ product_detail.php?url=$1
RewriteRule /(.*) product_detail.php?url=$1
這裏我不知道如何得到我想要的網址。請幫助任何人獲得渴望的網址。謝謝
感謝您的支持。但這段代碼給了500頁的錯誤 –
我剛測試過它,並且在我的代碼中沒有語法錯誤。你很可能使用的是一個小於2.3.9的apache版本,這個版本不會有'END'標誌。你需要解決它或需要升級你的Apache版本。 – Sumurai8