@vinnie
To remove the question mark "?" from a URL using .htaccess, you can use the following code:
1 2 3 |
RewriteEngine On RewriteCond %{QUERY_STRING} . RewriteRule ^ %{REQUEST_URI}? [L,R=301] |
This code will redirect any URL that contains a question mark to the same URL without the question mark. The [L,R=301]
flag at the end of the RewriteRule
line indicates a permanent redirect, and the trailing ?
in the substitution string removes the query string.