.htaccess question for the server savy.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • newbreed
    Confirmed User
    • Nov 2003
    • 9898

    #1

    .htaccess question for the server savy.

    This is what's in it now...

    # -FrontPage-

    Options None

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    require group authors administrators
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthType Basic

    Where would I insert the ip I want to block, and in what format should I put it?

    Thank you,
    Bill

    Loryn ‎(3:16 PM):
    I love it, just as long as we keep the bedroom door closed from all ears then we can have throw down hard core sex that makes us money haha
    fuck it we can have sex on money never did that before
  • mysh
    Registered User
    • Jul 2004
    • 24

    #2
    If you want to allow users from some IPs, and deny all others, you type:

    order deny,allow
    deny from all
    allow from 12.13.14.15
    allow from 12.13.14.16

    and so on. besides, you can define an address mask in allow from rule. for example, you want to allow all users from 12.13.14.* network - then you type:

    allow from 12.13.14.0/24

    so for 12.13.*.* - 12.13.0.0/16

    and so on... you get that.

    and if you want to allow all users except some addresses, you type

    order allow,deny
    allow from all
    deny from 12.13.14.15

    and so on. masks are allowed too. No matter where place you put those strings in .htaccess it will work fine.
    Maximum response from your teen traffic is HERE

    Comment

    • frank7799
      Confirmed User
      • Jul 2003
      • 1974

      #3
      Originally posted by newbreed
      This is what's in it now...

      # -FrontPage-

      Options None

      <Limit GET POST>
      order deny,allow
      deny from all
      allow from all
      require group authors administrators
      </Limit>
      <Limit PUT DELETE>
      order deny,allow
      deny from all
      </Limit>
      AuthType Basic

      Where would I insert the ip I want to block, and in what format should I put it?

      Thank you,
      Bill

      <Limit GET POST>
      order deny,allow
      deny from all
      allow from all
      require group authors administrators
      </Limit>
      <Limit PUT DELETE>
      order deny,allow
      deny from all
      allow from .domain.com 172.16.
      </Limit>

      But your code doesn´t block one IP adress, it blocks all and allows the specific domains and IP´s you mention in the allow derictive.

      It´s like mysh said, you have to put it the other way round.

      Comment

      Working...