Hi,
I am using an .htaccess file to block people from stealing my bandwidth but I want it to allow me domain and ther 2 subdomains.
I am using the below code which is working fine but could the code be made smaller?
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.net [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?media.mysite.net [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?topsites.mysite.net [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ /img/nolinking.jpe [NC,R,L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.net [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?media.mysite.net [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?topsites.mysite.net [NC]
RewriteRule \.(swf|mp3|wmv|zip)$ http://mysite.net [NC,R=301,L]
</IfModule>
Thanks