Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Is it possible to redirect all traffic from a certain referring URL to a specific page?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
Thanks, it an advertiser that linked to the wrong page (homepage instead of specific landing page) –  Jack Lockyer Aug 16 '13 at 13:33

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 ^(.*)$ http://www.yoursite.com/landingpage.html [NC,L,U,QSA]
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.