Forum Moderators: phranque
RewriteBase /
RewriteCond %{QUERY_STRING} ^(.*)(\\|%5C)$ [NC,OR]
RewriteCond %{THE_REQUEST} ^(.*)(\\|%5C)$ [NC]
RewriteRule .* $1 [R,L]
RewriteBase /
RewriteCond %{QUERY_STRING} (\\|%5C)$ [NC,OR]
RewriteCond %{THE_REQUEST} (\\|%5C)$ [NC]
RewriteRule .* [R=301,L] RewriteCond %{THE_REQUEST} ^(.*)(\\|%5C)$ [NC]
My understanding is that (.*) captures everything up to the specifically stated characters that follow it and that $1 returns the contents of the first set of capturing parentheses.
RewriteRule .* [R=301,L]