D
D
Denis2017-01-11 18:25:24
Apache HTTP Server
Denis, 2017-01-11 18:25:24

Redirect a specific GET to another domain?

I can’t build a redirect rule, please help.
Everything that comes to the site with /?ref= , /?referer= parameters with the same parameters is redirected to another domain

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
roswell, 2017-01-11
@gccDenys

RewriteCond %{QUERY_STRING} (ref=)([^&]+)|(referer=)([^&]+)
RewriteRule ^(.*)$ http://example.org/?%{QUERY_STRING} [R=301,L]

If necessary, 301 should be replaced with 302.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question