Domain Restriction

Discussion in 'PHP' started by dhrystone, Oct 31, 2007.

  1. #1
    Can anyone tell me how do i restrict public domains. Is there any script? I would just like to allow a few domains but don't have any predefined list of domains.
     
    dhrystone, Oct 31, 2007 IP
  2. Lordy

    Lordy Peon

    Messages:
    1,643
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what do you mean? can you explain a bit more?
     
    Lordy, Oct 31, 2007 IP
  3. bobb1589

    bobb1589 Peon

    Messages:
    289
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yes please explain... i am not sure what you mean... if i am understanding you correctly i think you can use .htaccess to do this... if i dont understand you... please explain more
     
    bobb1589, Nov 1, 2007 IP
  4. dhrystone

    dhrystone Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Well, the thing is that i would like to restrict most of the public domains.
    eg: yahoo, gmail, hotmail etc not allowed. Only corporate domains to be allowed.
     
    dhrystone, Nov 2, 2007 IP
  5. Zacha

    Zacha Active Member

    Messages:
    141
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #5
    You gotta go into your .htaccess and your robots.txt.

    robots.txt to restrict SE's. e.g. Deny * will stop robots from visiting your site.

    htaccess to stop i.p addresses
     
    Zacha, Nov 2, 2007 IP
  6. tamen

    tamen Peon

    Messages:
    182
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    What is it exactly that you want to stop?

    Is it people coming from those domains you want to stop from seeing your site?
    Or is it bots coming from those domains you want to stop from seeing your site?

    If it is the first one, you need to look at the users referrers and block them if the user comes from one of those domains.

    If its the other one, you can do it with .htaccess and robots.txt as Zacha said.
     
    tamen, Nov 2, 2007 IP