Secure Your Site (.htaccess)

This post is also available in: Romanian

 Secure Your Site (.htaccess)

One way to prevent unwanted access of your site is using the file .htaccess

Reasons:
– Restrict access to a known hacker / bot from accessing your site
– Allowing only certain IP addresses to view your site (while in development, for example)
– Allow only trusted individuals in your site (if your users IPs remain the same, because it’s safer)
– Banning people from a particular country (or any location unknown) to access your site
– Ban people from your site


Here are lines that can be added to .htaccess:

Code:
<limit GET POST PUT>
order deny,allow
deny from 202.57.377.22
deny from 8.77.88.33
allow from all
</limit>

Remove access for specified IPs.

Code:
<limit GET POST PUT>
order deny,allow
deny from all
allow from 192.168.0.0/24
</limit>

Only allow access to the mentioned IP class.


[Image: xenno_24.gif]

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload CAPTCHA.