Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder Psionicsin's Avatar
    Join Date
    Aug 2010
    Location
    Detroit, Michigan
    Posts
    346
    Thanks
    54
    Thanked 0 Times in 0 Posts

    HELP: htaccess allow/deny/redirect IP

    I need to allow only 3 IP address, and redirect all others that are not that IP address to another page.

    Configuring htaccess is confusing to me, so can someone throw me a bone?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Simple allow/deny rules.
    Code:
    order deny, allow
    deny from all
    allow from 127.0.0.1
    allow from 192.168.0.0/16
    allow from 172.16.0.0–172.31.255.255
    You can group them together as well as use ranges and cidr notation.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •