.htaccess question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • UmBongo
    Registered User
    • Jan 2003
    • 23

    #1

    .htaccess question

    Is it possible using an .htaccess file to restrict access to a domain by referring domain ?

    What I mean is, for example lets say I have a domain

    www.abctest.com and I only want people clicking on links at
    www.abctest2.com & www.abctest3.com to be allowed access.

    Any links to www.abctest.com placed anywhere else should not allow access ??

    Any ideas
  • funkmaster
    So Fucking Banned
    • Sep 2001
    • 7938

    #2
    yes, this is possible -> <a href="http://www.google.com/search?sourceid=navclient&hl=us&ie=UTF-8&oe=UTF-8&q=%2Ehtaccess">continue here</a>

    Comment

    • JimW
      Confirmed User
      • Dec 2002
      • 422

      #3
      in unix, save the below code as .htaccess and place this in the www.abctest.com directory on your server:

      RewriteEngine On

      #RewriteCond %{HTTP_REFERER} !^$
      RewriteCond %{HTTP_REFERER} !^http://www.abctest2.com/ [NC]
      RewriteCond %{HTTP_REFERER} !^http://www.abctest3.com/ [NC]
      RewriteRule /* http://www.yourdeniedaccessurl.com

      Comment

      Working...