Jump to content

modaven

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by modaven

  1. Hi David,

     

    Welcome to the forums :)

     

    I haven't tested it, but try;

    >RewriteEngine on
    RewriteBase /
    RewriteCond %{HTTP_REFERER} !^http://www\.your_domain_name\.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www\.OKdomain1\.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www\.OKdomain2\.com/ [NC]
    RewriteRule ^.*$ http://www.your_domain_name.com/not_allowed_here.htm [R=301,L]

     

    or I'd try something along those lines anyway - with the not_allowed_here.htm being a page I redirected all those I don't want to.

     

    So I have been trying different variables of the above for a couple days not with no luck. I can get the page to redirect to the "not_allowed_here", but everything goes there, even the request from the referer I want. Here's what I am using, but is not working...

     

    >RewriteEngine on
    RewriteBase /
    RewriteCond %{HTTP_REFERER} !^http://www\.yahoo\.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www\.google\.com/ [NC]
    RewriteRule ^.*$ http://www.totalchoicehosting.com [R=301,L]

     

    The site I am trying to get to is www.vzbmarketcenter.com. Based on what I have above, I would think that anything coming from yahoo.com, www.yahoo.com, google.com or www.google.com would be able to get through, but anything else would go to www.totalchoicehosting.com. I also tried getting rid of the "\"'s, but got the same results.

     

    Sorry, I am not up on the syntax of this, which is probably my problem.

     

    Any thoughts?

     

    Thanks again!!!

     

    David

  2. Good afternoon-

     

    I have browsed the forums as well as the web looking for an answer to this question. Hope someone out there can help.

     

    I need to create a .htaccess file that will only allow the files in the folder to be seen if the "referer" is from a particular site (or possibly two sites). I have found a lot of solutions out there for people who want to block specific sites, but I can't seem to figure out how to only allow specific sites. I have done some trial and error based on some of the things I have found, but with no luck.

     

    Any ideas?

     

    Thanks in advance!

     

    David

×
×
  • Create New...