...

View Full Version : htaccess 'block by IP' problem



Tomi_1
08-05-2005, 10:35 AM
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...

_Aerospace_Eng_
08-05-2005, 10:43 AM
Who is your web host? Do they support htaccess?

iota
08-05-2005, 10:52 AM
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.

Tomi_1
08-05-2005, 11:10 AM
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

iota
08-06-2005, 12:02 PM
It's correct. ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum