Is there any way to block domain users from downloading exe files or softwares or specific type of files like mp3 etc. without using any third party softwares.
unfundedPeople succeed in answering gc's questions 0% of the time (0 success in 6 attempts).
Answers by: stellah78 | coolguy008 | manutdrule1990 | defcon | piercer79 | darksanity
Do you mean stopping users from downloading (or accessing) exe, mp3 files etc. from your website?
If so, and you run a Linux server, you can create a .htaccess file and enter the following:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|swf)$ http://www.yourdomain.com/ [R,NC]
Replace or Add to the list in the final line of code (where the jpg, jpeg, gif etc. are listed with the file types that you wish to block, for example exe, mp3, mp4, avi.