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
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    testing .htaccess deny/allow script

    hi,
    i got this script from the tutorials page to add to my .htaccess file:
    order allow,deny
    deny from 123.45.6.7
    deny from 012.34.5.
    allow from all

    i added my webserver ip address, but i was still allowed onto the site. if i changed "allow from none", then no access was allowed. i have a list of ip's that i want to block. why was my address still allowed to enter the site, is it because my ip and the servers is the same? i would like to test the above script with someone is interested.
    tnx, bob

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    If you're on localhost, you're IP according to you're Apache is 127.0.0.1 (loopback), not whatever you're adapter address is.
    What you have is correct, just add the deny from x.[x.[x.[x]]] values.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

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