Forum Moderators: phranque
say my domain is mysite.com
my first subdomain is chat.mysite.com
and my second subdomain is store.mysite.com
Currently I have:
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://mysite.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.mysite.com$ [NC]
RewriteRule .*\.(jpg¨jpeg¨gif¨png)$ - [F,NC]
This was actually done in Cpanel and works great for the main site
but this will block images when people arrive from store.mysite.com/
should it be something like this:
RewriteCond %{HTTP_REFERER}!^http://(www\.)?(store\.)?mysite.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?(chat\.)?mysite.com$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?mysite.com/.*$ [NC]
thanks for any help
Johnny
to access the file types (upper and lowercase or mixed):
RewriteEngine on
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://(www\.)?(store\.¦chat\.)?mysite.com [NC]
RewriteRule \.(jpe?g¨¦gif¦¨png)$ - [F,NC]
Replace the broken vertical pipe "¦" characters with solid pipes from your keyboard before use.
Jim
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com(/.*)?$ [NC]
RewriteRule \.(jpe?g¦gif¦png)$ - [F,NC]