Security
Configure security rules and access control
Directory Access
Prevents directory listing and sets default index files
Options -Indexes
DirectoryIndex index.php index.html
IP Blocking
Block specific IP addresses while allowing others
Order Allow,Deny
Deny from 192.168.1.1
Allow from all
Password Protection
Protect directories with password authentication
AuthType Basic
AuthName "Restricted Area"
AuthUserFile /path/to/.htpasswd
Require valid-user
Prevent Hotlinking
Prevent other websites from hotlinking your images
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
Generated .htaccess
Loading...