如何製作.htaccess到如果不是,請從URL中刪除問號?id=(.*)
?Apache .htaccess:如果不是`?id =(。*)`,如何從URL中刪除問號?
# Rewrite for ?id=(.*)
RewriteCond %{QUERY_STRING} ^id=(.*)$
RewriteRule .*$ %{REQUEST_URI}%1? [R=301,L]
# It does not work out on this way
RewriteCond %{QUERY_STRING} !=""
RewriteCond %{QUERY_STRING} !^id=.*
RewriteRule .*$ %{REQUEST_URI}%1? [R=301,L]
您的共享URL有重寫(刪除)定義的查詢字符串以及除去定義的查詢字符串以外的所有查詢的示例。 – Binyamin 2013-03-28 15:05:30