title: .htaccess redirect referrer on specific URL visit
body: <p>I have understood the basics of redirecting a refferer through .htaccess but the only things i could manage to do with the .htaccess file was to either deny the entry of the whole folder or of a file but i never understood how to set up a redirection rule on a custom index page for example</p>
  
  <p>What im trying to go for:</p>
  
  <p>I want only 1 specific referrer to be able to visit this site "<a href="http://mydomain.com/index.php?page=Custom&amp;pageID=7" rel="nofollow">http://mydomain.com/index.php?page=Custom&amp;pageID=7</a>"</p>
  
  <p>Everyone else that is not the specified referer should get redirected to another page.</p>
  
  <p>I tried numerous php scripts for referrer detection but none of them seemed to work for me unfortunately</p>
  
  <p>I would be very thankful for a solution :)</p>
  
  <p>EDIT: Something like this ofcourse this doesn't work unfortunately</p>
  
  <pre><code>RewriteCond %{HTTP_REFERER} !^http://www\.refferersite\.org/ [NC]
  RewriteRule ^/index.php?page=Custom&amp;pageID=7 http://newsite.com/index.php [L]"
  </code></pre>