我想更改我的网址(htaccess) 来自:
www.website.com/page.php?id=128
到:
www.website.com/?a=128
和
www.website.com/images.php?id=128
到:
www.website.com/?i=128
谢谢
答案 0 :(得分:2)
将此代码放入DOCUMENT_ROOT/.htaccess
文件中:
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)i=([^&]+)
RewriteRule ^$ /images.php?id=%1 [L]
RewriteCond %{QUERY_STRING} (^|&)a=([^&]+)
RewriteRule ^$ /page.php?id=%1 [L]