Dynadot โ€” .com Registration $8.99

.htaccess help needed

Spacemail by SpaceshipSpacemail by Spaceship
Watch
Impact
91
please tell me whats wrong in this .htaccess file? i have tried to block commonly used hackers IP addresses and China as a whole

but when i save it, i am not able the site at all and i am getting a INternal Configuration Error :(

http://uck.in/htaccess.txt

thanks


**Note : anybody wishing to use this .htaccess file on your own website is free to do so :)

p.s: the upload function of this forum is not working. i am getting a php error while trying to upload it here.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
I can understand why you would want to block known hackers IPs, but why would you want to block China and Iraq?
 
0
•••
Danltn said:
I can understand why you would want to block known hackers IPs, but why would you want to block China and Iraq?
because these countries generally bring low-quality lots and lots of traffic..

they can utilise GB's of bandwidth in a single day and the revenue u earn from them is very low. may be 0.01-0.05$ per click which is simply not profitable
 
0
•••
Two things is important here:

1. seperate the IPs into different deny from rules. Thats because when you are actually writing them in line, they are getting new line in ASCII and generating errors.

So instead of doing this:
# Iraq country block
deny from 78.109.224.0/20 80.77.176.0/20 81.90.16.0/20 88.201.0.0/17 194.117.56.0/21

Do this:
# Iraq country block
deny from 78.109.224.0/20
deny from 80.77.176.0/20
deny from 81.90.16.0/20
deny from 88.201.0.0/17
deny from 194.117.56.0/21
2. Some web servers require rules definition in every block. So try changing the following code too:

<Files .htaccess>
deny from all
</Files>

to:
<Files .htaccess>
order deny,allow
deny from all
</Files>

Let me know if any of these helped you :)

Good Luck.
Regards
 
0
•••
Unstoppable Domains
Domain Recover
DomainEasy โ€” Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back