Forum Moderators: phranque
RewriteEngine On
#
# Redirect non-blank query string to remove query string
# and fix www at the same time for those requests
RewriteCond %{QUERY_STRING} .
RewriteRule (.*) http://www.example.com/$1? [R=301,L]
#
# Redirect all non-canonical (non-www, appended port
# number, etc) host name requests to www version
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1? [R=301,L]
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/.*(php|/).*
RewriteCond %{QUERY_STRING} ^[a-z0-9] [NC]
RewriteRule (.*) http://www.my_site.com/$1? [R=301,L]
RewriteEngine on
#
RewriteCond %{QUERY_STRING} .
RewriteRule ^$ http://www.example.com/? [R=301,L]
RewriteEngine on
#
RewriteCond %{QUERY_STRING} ^C=([MN]\%3BO=D|S\%3B=A)$
RewriteRule ^$ http://www.example.com/? [R=301,L]
RewriteEngine on
#
RewriteCond $1 !^wp-content/
RewriteCond %{QUERY_STRING} .
RewriteRule ^(.*)$ http://www.example.com/$1? [R=301,L]