Blocking IP Using htaccess

Discussion in 'Apache' started by anoopsharda, Feb 26, 2007.

  1. #1
    I have certain folders whose content i don't want any one to read directly from browser. But the content should be accessble only through the system witin the site. how can I achieve that. I tried doing the following

    order deny,allow
    deny from all
    allow from 127.0.0.1

    but it is not working. Need assistance.

    Anoop
     
    anoopsharda, Feb 26, 2007 IP
  2. Richie_Ni

    Richie_Ni Illustrious Member

    Messages:
    10,721
    Likes Received:
    1,175
    Best Answers:
    0
    Trophy Points:
    410
    #2
    I think you should replace "127.0.0.1" with your IP.
     
    Richie_Ni, Feb 26, 2007 IP
  3. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You must add another line

    allow your.server.ip.here
     
    inworx, Feb 27, 2007 IP
  4. WebGeek182

    WebGeek182 Active Member

    Messages:
    510
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    95
    #4
    I agree with inworx...place your server IP there.
     
    WebGeek182, Mar 3, 2007 IP