0
更改URL格式我目前使用如何使用UrlRewrite和htaccess的
http://server.com/index.php?page1=main&page2=contacts
我想改變它像
http://server.com/main/contacts
你能幫助如何編寫一個帶樣本代碼的.htaccess文件。
更改URL格式我目前使用如何使用UrlRewrite和htaccess的
http://server.com/index.php?page1=main&page2=contacts
我想改變它像
http://server.com/main/contacts
你能幫助如何編寫一個帶樣本代碼的.htaccess文件。
試試這個代碼
RewriteEngine on
RewriteRule ^main/contacts$ index.php?page1=main&page2=contacts [L]
OR(動態頁面)
RewriteEngine on
RewriteRule ^(.*)/(.*)$ /index.php?page1=$1&page2=$2