我是URlRewriting的新手,我一直在重寫網址時遇到了一些問題。我做了重寫動態網址 像如何做靜態頁面的URL重寫?
www.mysite.com/page.php?id=4
到
www.mysite.com/4
但是我對靜態頁面的url重寫的問題..
www.mysite.com/page.php
到
www.mysite.com/page
我谷歌 很多但沒有找到答案sutable。請幫我.....
我使用這些模式
RewriteRule ^flight-bookings /flight-bookings.php [L]
RewriteRule ^flight-bookings$ /flight-bookings.php [L]
RewriteRule ^flight-bookings flight-bookings.php [L]
但是,沒有一個工作,我總是有沒有發現404頁。雖然
www.mysite.com/flight-bookings.php
完全
你的意思是這樣的:http://stackoverflow.com/questions/4588022/htaccess-to-remove-php-extension-godaddy – jtheman
從這裏開始:http://httpd.apache.org/docs/current/rewrite/intro .html#regex – hakre