Skip to content

Instantly share code, notes, and snippets.

@fangcat
Created July 24, 2014 12:58
Show Gist options
  • Save fangcat/b626e21734d85daedd82 to your computer and use it in GitHub Desktop.
Save fangcat/b626e21734d85daedd82 to your computer and use it in GitHub Desktop.
從網址中移除多餘的查詢參數
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} !=""
RewriteCond %{QUERY_STRING} !^p=.*
RewriteCond %{QUERY_STRING} !^s=.*
RewriteCond %{REQUEST_URI} !^/wp-admin.*
RewriteRule ^(.*)$ /$1? [R=301,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment