How to make .htaccess to remove question mark from URL if not ?id=(.*)?
?id=(.*)
# Rewrite for ?id=(.*) RewriteCond %{Q
This would be the right rule:
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^?#\ ]*)\?[^\ ]*\ HTTP/ [NC] RewriteCond !{QUERY_STRING} id RewriteRule .*$ %{REQUEST_URI}? [R=301,L]
Update:
# Query rewrite exceptions RewriteCond %{QUERY_STRING} !callback=.*