Results 1 to 9 of 9

Thread: Hotlink protection but no subdomains

  1. #1
    Join Date
    Jan 2011
    Posts
    127

    Hotlink protection but no subdomains

    Hi

    I have used http://help.directadmin.com/item.php?id=33 for Hotlink protection how i can Authorize all dynamic subdomains ?

    Thank you.

  2. #2
    Join Date
    Aug 2008
    Posts
    4,697
    If its in your parent public_html folder it will work with all subdomains in there.

  3. #3
    Join Date
    Jan 2011
    Posts
    127
    Quote Originally Posted by scsi View Post
    If its in your parent public_html folder it will work with all subdomains in there.
    http://sub.maindomain.com can't load images is protected by hotlink

    Code:
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?maindomain.com [NC]
    RewriteRule \.(jpg|jpeg|png)$ https://www.maindomain.com/stealingisbad.png [NC,R,L]
    subdomains is by wordpress blog created

  4. #4
    Join Date
    Aug 2008
    Posts
    4,697
    You would have to add another line for your subdomain like this:

    Code:
    RewriteCond %{HTTP_REFERER} !^http(s)?://(sub\.)?maindomain.com [NC]
    So that it looks like:

    Code:
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?maindomain.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(sub\.)?maindomain.com [NC]
    RewriteRule \.(jpg|jpeg|png)$ https://www.maindomain.com/stealingisbad.png [NC,R,L]

  5. #5
    Join Date
    Jan 2011
    Posts
    127
    Quote Originally Posted by scsi View Post
    You would have to add another line for your subdomain like this:

    Code:
    RewriteCond %{HTTP_REFERER} !^http(s)?://(sub\.)?maindomain.com [NC]
    So that it looks like:

    Code:
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?maindomain.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(sub\.)?maindomain.com [NC]
    RewriteRule \.(jpg|jpeg|png)$ https://www.maindomain.com/stealingisbad.png [NC,R,L]
    Thank you i have 1000+ subdomains "http(s)?://(sub\.)?maindomain.com" support all?

  6. #6
    Join Date
    Aug 2008
    Posts
    4,697
    Try this instead:

    Code:
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://*.maindomain.com [NC]
    RewriteRule \.(jpg|jpeg|png)$ https://www.maindomain.com/stealingisbad.png [NC,R,L]

  7. #7
    Join Date
    Jan 2011
    Posts
    127
    images isn't loaded on subdomains

  8. #8
    Join Date
    May 2008
    Location
    The Netherlands
    Posts
    1,158
    maybe

    Code:
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(.*\.)?maindomain.com [NC]
    RewriteRule \.(jpg|jpeg|png)$ https://www.maindomain.com/stealingisbad.png [NC,R,L]

  9. #9
    Join Date
    Jan 2011
    Posts
    127
    Quote Originally Posted by Arieh View Post
    maybe

    Code:
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(.*\.)?maindomain.com [NC]
    RewriteRule \.(jpg|jpeg|png)$ https://www.maindomain.com/stealingisbad.png [NC,R,L]
    many thanks working. good luck Arieh, scsi

Similar Threads

  1. Hotlink protection?
    By Katy in forum Admin-Level Difficulties
    Replies: 1
    Last Post: 07-18-2006, 04:13 PM
  2. HotLink Protection
    By leblover in forum General Technical Discussion & Troubleshooting
    Replies: 9
    Last Post: 06-30-2005, 09:44 AM
  3. hotlink protection
    By Lem0nHead in forum DirectAdmin General Discussion
    Replies: 3
    Last Post: 12-07-2004, 12:40 PM
  4. Hotlink Protection
    By rumrugby in forum DirectAdmin General Discussion
    Replies: 6
    Last Post: 05-12-2004, 03:48 PM
  5. Is there a hotlink protection feature in DirectAdmin?
    By Tenggiri in forum General Technical Discussion & Troubleshooting
    Replies: 5
    Last Post: 02-17-2004, 08:55 AM

Posting Permissions

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