Reputation: 2344
Need to redirect
http://www.example.com/es/?p=2%3Fp%3D2
to
I tried with 301, and with rewriterule, but without luck Thanks in advance,
Upvotes: 1
Views: 61
Reputation: 41219
You can use the following RewriteRule
RewriteEngine on
RewriteCond %{THE_REQUEST} /es/\?p=.+ [NC]
RewriteRule ^ /es/? [L,R=301]
The empty question mark ? at the end of the rule's target is important as it discards the old querystring. Don't remove this otherwise you will get a redirect loop error.
Upvotes: 1