: Conditional redirect based on referring source? Is it possible to redirect all traffic from a certain referring URL to a specific page?
Is it possible to redirect all traffic from a certain referring URL to a specific page?
More posts by @Deb1703797
2 Comments
Sorted by latest first Latest Oldest Best
You can use RewriteCond %{REMOTE_HOST} or RewriteCond %{REMOTE_ADDR} to set such redirects.
Try something like:
#A .B.C.D is the referrer IP@
RewriteCond %{REMOTE_HOST} ^A.B.C.D
RewriteRule ^(.*)$ www.yoursite.com/landingpage.html [NC,L,U,QSA]
Yes, from a technical point of view, it is possible to examine the referrer URL and issue a redirect if it matches.
Whoever is linking into your site may not like this. Presumably, they want their users to see some of your content and have linked to where they think is appropriate. You could certainly do this to correct their mistake or broken link. I wouldn't do this for traffic from a search engine though.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.