Forum Moderators: phranque

Message Too Old, No Replies

folder access

         

nivlam

11:11 pm on Aug 22, 2007 (gmt 0)

10+ Year Member



I understand that you can stop image hotlinking using htaccess, but is there a way to stop people from viewing the contents of an entire folder?

Here is my situation: I have a site which uses a lot of javascripts, so my source looks something along the lines of:

<script type="text/javascript" src="/../one.js"></script>
<script type="text/javascript" src="/../two.js"></script>
<script type="text/javascript" src="/../three.js"></script>

There is a person out there who copied my entire site (he basically just looked at the source and copy/pasted the whole thing).

The problem is that he modified the source to link to my domain like this:

<script type="text/javascript" src="http://www.mydomain.com/.../one.js"></script>
<script type="text/javascript" src="http://www.mydomain.com/.../two.js"></script>
<script type="text/javascript" src="http://www.mydomain.com/.../three.js"></script>

Is there a way to stop this?

jdMorgan

11:51 pm on Aug 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sometimes, for various reasons, the HTTP Referer header will be blank -- Nothing we can do about that.

But for cases where it is not blank, then deny access to your .js files if the referrer is from his site, or if it is NOT from your own site. If you use this latter method, either allow for search engine cache referrals, or use the <meta name="robots" content="nocache"> tag on your pages, so that people viewing the cached pages won't see a broken site.

Before you do any of that, though, I suggest you go through your access log archives, and find this person's IP address. Then block that address (or the entire address range, if he's on a DHCP ISP), so he cannot visit your site at all. This will at least make it a little more difficult for him to just copy your scripts onto his own site once he discovers he can no longer link to them.

Also, if you can prove that he copied your site, why not issue a DMCA take-down to his host, the major search engines, and his ISP? If you are absolutely sure and can prove it, then this is a legal thing to do, and will definitely teach him not to copy sites again. If you are not 100% sure, consult an attorney.

Jim