Default directory page
DirectoryIndex filename.html index.cgi index.pl default.htm
Protect access of .htaccess file
order allow,deny
deny from all
Customized error documents:
ErrorDocument 400 /errors/badrequest.html
ErrorDocument 401 /errors/authreqd.html
ErrorDocument 403 /errors/forbid.html
ErrorDocument 404 /errors/notfound.html
ErrorDocument 500 /errors/serverr.html
Blocking users by IP
order allow,deny
deny from 123.45.6.7
deny from 012.34.5.
allow from all
Redirects
Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.html
Add MIME Types
AddType application/x-shockwave-flash swf
Protec againts hot linking of images and other file types
Preventing Directory Listing
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg|js|css)$ - [F]
Preventing Directory Listing
IndexIgnore *
IndexIgnore *.bmp *.gif
No comments:
Post a Comment