Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Htaccess - anti-pic-hot-link excl. subdomains

    Hi,

    The code mentioned below is great....

    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite\.com/.*$ [NC]
    RewriteRule .*\.(gif|jpg)$ - [F,L]

    However, I would like to have a subdomain, like sub.mysite.com, and show pictures on it....

    Can you help me?

    Thanks,
    Jerome

  • #2
    Regular Coder
    Join Date
    Oct 2002
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Resolved

    Found it,

    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite\.com/.*$ [NC]

    Need to be rewritten as:

    RewriteCond %{HTTP_REFERER} !^http://(www|sub\.)?mysite\.com/.*$ [NC]

    Thanks anyway


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •