
How to Prevent Directory Listing
- This can prevent users from accessing indexes of your root or any content on your site
- like they can open yourplace.com/folder/
- and see the files saved on it

How to Prevent Directory Listing
- This can prevent users from accessing indexes of your root or any content on your site
- like they can open yourplace.com/folder/
- and see the files saved on it
so to prevent that just put this line into your .htaccess file
IndexIgnore
this will prevent indexing Globally . but if you want to index certain files and prevent others
IndexIgnore .zip .rar
this will index all files on the server EXCEPT zip and rar files .
How to Prevent Images Hotlinking
- most of webmasters wanna prevent that coz it’s simply bandwidth stealing
- you might find many traffic or clicks coming from certain site that
uses your images in their own site and screwing up with your bandwidth
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www’.)?bluecirclet.com/.*$ [NC]
RewriteRule ’.(gif|jpg|js|css)$ - [F]
replace bluecirclet.com with your own site and this will show nothing when some one try to use the file types listed in the 4th line .
another method
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www’.)?bluecirclet.com/.*$ [NC]
RewriteRule ’.(gif|jpg)$ http://www.bluecirclet.com/someimage.gif [R,L]
this will show the image in the 4 line when some one tries to hotlink to any images in your site
How to Prevent viewing of .htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
add these lines and your .htaccess won’t be viewed by any browser
How to Redirect Pages
Redirect /oldfolder/somefile.html http://bluecirclet.com/newfile.html
this will redirect files
Redirect /oldfolder/ http://bluecirclet.com/newfolder/
this will redirect entire folder
How to Block Users that came from Certain Domains
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} illegal-site’.com [NC]
RewriteRule . - [F]
this will block users comes from ANY link for your site on illegal-site.com
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} illegal-site’.com [NC,OR]
RewriteCond %{HTTP_REFERER} illegal-site2’.com
RewriteRule .* - [F]
this will block all traffic from illegal-site.com and illegal-site2.com [ helps when you want to block more than one domain ]
How to Block Users per IP
order allow,deny
deny from [ip]
allow from all
replace [ip] for the IP you wanna block and it’s done
One Random Link ===> abandoned city