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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    htaccess 'block by IP' problem

    I have tried to block mutiple users by IP with .htaccess. I have uploaded (ASCII-form) the htaccess.txt-file to server with FTP and CHMOD it 644 + renamed it to .htaccess. Then I open my homepages and I get Error 500:Internal server error. This error comes when I go to my homepages where this .htaccess file is. There is no my IP in the list, but still I can't open the page!

    I wonder why this won't work. I have made custom error-files with htaccess and it work's well... so .htaccess support should be fine.

    So.. what is wrong? This is my .htaccess file:

    order allow,deny
    allow from all
    deny from xxx.xxx.xx.xx
    deny from zzz.zzz.zzz.zzz
    deny from cc.ccc.cc.ccc
    deny from vvv.vvv.vvv.vv
    deny from www.www.www.ww
    deny from qq.qqq.qqq.qqq
    deny from eee.eee.ee.ee
    deny from yyy.yyy.yyy.y

    So how I can block multiple IPs with htaccess? Nothing has helpt me. I've tried google and htaccess tutorials.. I'm quite desperate. I've chosen .htaccess because it's the most effective way, so PHP or JavaScript aren't so interesting.

    Sorry my bad english...

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Who is your web host? Do they support htaccess?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Registered User
    Join Date
    Oct 2004
    Posts
    592
    Thanks
    0
    Thanked 1 Time in 1 Post
    Make sure that your hosting providers fully allow .htaccess function.

    The .htaccess doesn't work in some web hostings. I've tried like you in one of my sites http://icebergz.biz.ly . Only the error 404 and 403 do work.

    It is said that .htaccess eats server brains.

  • #4
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My web host is http://www.netikka.fi/fin/index.asp (Finnish). I may ask them do they support block by IP-function in htaccess.

    But my htaccess code is right to block multiple IPs?
    order allow,deny
    allow from all
    deny from xxx.xxx.xx.xx
    deny from zzz.zzz.zzz.zzz
    deny from cc.ccc.cc.ccc
    deny from vvv.vvv.vvv.vv
    deny from www.www.www.ww
    deny from qq.qqq.qqq.qqq
    deny from eee.eee.ee.ee
    deny from yyy.yyy.yyy.y

  • #5
    Registered User
    Join Date
    Oct 2004
    Posts
    592
    Thanks
    0
    Thanked 1 Time in 1 Post
    It's correct.


  •  

    Posting Permissions

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