如何制作.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