Wolfgang
Wolfgang

Reputation: 254

ModRewrite redirect to url from query string

I have a domain

http://mydomain.com/

And i need redirect from this link

http://mydomain.com/?http://example.com

to

http://example.com

Thanks.

Upvotes: 0

Views: 24

Answers (1)

Howli
Howli

Reputation: 12469

This should work for you:

RewriteEngine on
RewriteCond %{THE_REQUEST} ^(GET|POST)\ /\?(.*)\ HTTP
RewriteRule ^ %2\? [R=301,L]

Upvotes: 1

Related Questions