1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Permitting only a few IPs to access directory?

Discussion in 'Security' started by pr0xy122, Jul 30, 2007.

  1. #1
    I want to be able to ban all IPs from accessing a specific directorie APART from the IP addresses that I specifiy.

    So basically only I can see the directory I specify.

    Im pretty sure there must be a way of doing this via CPanel or something.
    Thanks. :)
     
    pr0xy122, Jul 30, 2007 IP
  2. classifieds

    classifieds Sopchoppy Flash

    Messages:
    825
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    150
    #2
    create a .htaccess file in the subdirectory and add this to it.

    where xx.xx.xx.xx = the IP address to allow in.

    You can also password protect the directory in cpanel - it requires a userid / password for someone to access it.
     
    classifieds, Jul 30, 2007 IP
    pr0xy122 likes this.
  3. pr0xy122

    pr0xy122 Peon

    Messages:
    1,649
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks I appreciate this a lot.

    Green Rep :).
     
    pr0xy122, Jul 30, 2007 IP
  4. pr0xy122

    pr0xy122 Peon

    Messages:
    1,649
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #4
    So if this is all i have in my htaccess file should it be ok.


    
    deny from all
    allow from xx.xx.xxx.xxx
    allow from xxx.xxx.xxx.xxx
    
    Code (markup):
    Thanks.

    EDIT: or do I need somehting like order deny,allow ?
     
    pr0xy122, Jul 31, 2007 IP
  5. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Its fine and would work.
     
    inworx, Aug 5, 2007 IP
  6. n3o_the_on3

    n3o_the_on3 Well-Known Member

    Messages:
    1,422
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #6
    thanks classifieds, its really a good trick to know.
     
    n3o_the_on3, Aug 22, 2007 IP