Reputation: 13
I am working on a project on some .htaccess
task (and i am also new to .htaccess
). my task is as follows
i am to redirect the url from
http://example.com/xxx-yyy-zzzz/?Facebook+CaracteresMx
to
http://example.com/xxx-yyy-zzzz/
and i am not able to remove the invalid query string /?Facebook+CaracteresMx
from url.
Currently i am doing this with php (as getting the query string and then replace the text , then redirect) which slow down the speed.
Upvotes: 1
Views: 35
Reputation: 784898
You can use this rule:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^Facenook [NC]
RewriteRule ^ %{REQUEST_URI}? [L,R=301]
Upvotes: 1