Reputation: 97571
I want to redirect
http://myoldsite.com/page?query=some+arguments&some_more
To
'http://mynewsite.com/?notfound=' + urlencode('page?query=some+arguments&some_more')
Is this possible with htaccess alone?
Upvotes: 2
Views: 577
Reputation: 785128
You can use a combination of B
and NE flags to escape the back-references:
RewriteEngine On
RewriteCond %{QUERY_STRING} .+
RewriteRule ^page/?$ /?notfound=$0\%3f%0 [L,NC,R=302,B,NE]
Upvotes: 2