How to stop a webite from using my CSS file

Discussion in 'CSS' started by fireworks-styles, Oct 13, 2006.

  1. #1
    Hiyya,

    Not sure if this can be done..but a site is directly linking my CSS file to there website...They use to be "hotlinking" all my images but I placed some code in .htaccess to stop them from doing this.


    I sent them a C&D letter but to no avail.

    So is there a way I can stop them from directly importing my CSS file?

    Its so frustrating!

    Thanks, Debra.
     
    fireworks-styles, Oct 13, 2006 IP
  2. MrX

    MrX Well-Known Member

    Messages:
    1,563
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    140
    #2
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
    RewriteRule \.(gif|jpg|js|css)$ - [F]

    Try that in your htaccess...replace mydomain.com with your own, and it'll prevent hotlinking of gif, jpg, js, and css files.
     
    MrX, Oct 13, 2006 IP
    fireworks-styles likes this.
  3. fireworks-styles

    fireworks-styles Well-Known Member

    Messages:
    234
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    158
    #3
    Thank you Mr X!

    That did the trick. I've never had had this happen to me before.

    Regards, Debra :)
     
    fireworks-styles, Oct 13, 2006 IP
  4. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I would suggest taking it up with their host or ISP. Use whois to get the domain details. Bandwidth theft is irresponsible and unacceptable.
     
    penagate, Oct 15, 2006 IP
  5. MrX

    MrX Well-Known Member

    Messages:
    1,563
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    140
    #5
    Blocking their linking shuts them up faster than contacting and waiting for replies.

    I had a friend from Adelaide in college...says all you guys drink is Coopers down there. :)
     
    MrX, Oct 15, 2006 IP
  6. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Damn straight, none of that export-quality Fosters rubbish.

    I agree blocking hotlinking is the way to go but I would also pursue it further; at least to try and get an apology out of them. Maybe that's just me though. :)
     
    penagate, Oct 15, 2006 IP
  7. daboss

    daboss Guest

    Messages:
    2,249
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #7
    good that you have resolved the problem... :)

    i believe in cpanel there is also an option for hotlinking protection? ;)
     
    daboss, Oct 15, 2006 IP
  8. antonaf

    antonaf Banned

    Messages:
    411
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Any way to prevent hotlinking on a Windows server with IIS, since IIS does not support .htaccess??

    It's a dedicated server, so I have admin priveleges.
     
    antonaf, Oct 15, 2006 IP
  9. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #9
    penagate, Oct 15, 2006 IP
  10. RRWH

    RRWH Active Member

    Messages:
    821
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    70
    #10
    Better still, Use a re-write condition - but take 5 mins to re-hash the CSS to make their site look like sh*t! You know - Font-size to 100pt, H tags to 1px, BG color, color, Borders, underlines etc etc.

    I bet they would change it even faster than simply blocking it!
     
    RRWH, Oct 15, 2006 IP
  11. Imran

    Imran Notable Member

    Messages:
    2,340
    Likes Received:
    190
    Best Answers:
    0
    Trophy Points:
    230
    #11
    Your code will also block's images from being linked or indexed by search engines.

    If i may just modify this:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
    RewriteRule \.(js|css)$ - [F]
     
    Imran, Oct 16, 2006 IP
    Bernard likes this.
  12. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #12
    That's what I would do. Pass them a different CSS file that you've specifically designed to ruin their site. Maybe some pr0n backgrounds... it's been done before with XML/RSS thieves and works :D
     
    Gordaen, Oct 16, 2006 IP
  13. dastuff

    dastuff Peon

    Messages:
    475
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #13
    That's because you've got to be one lazy grabber to actually hotlink to someone's css code... I mean images are one thing, but a css code is saved after it's downloaded once... Can't really be the largest bw expense.

    But I would have to agree, no need to block it, do something malicious and take a picture and post it on here lol.
     
    dastuff, Oct 16, 2006 IP
  14. nix

    nix Guest

    Messages:
    116
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    i know your problem is solved, but i like the idea of having a css file designed specifically for that fu**er who was leeching bw off your site, and from that css, make the website look like p*rn or what have you.
    OR--
    report the matter to authorities and get the site blocked with a very mind pleasing apology letter from those losers!
     
    nix, Oct 20, 2006 IP