View Full Version : is there something you can do with .htaccess or something else to stop..........
Weapon
May 12th, 2001, 18:52
Is there something you can do with .htaccess or other form of script that makes it that other site can't link to your images and downloads like geocities and other major free web host has done?
meow
May 12th, 2001, 18:59
Yes. Here you go, just to copy-paste (almost).
http://www.iboost.com/build/backend/895.htm
http://www.bruce-hamilton.com/tutorials/password.shtml#bandwidth
Weapon
May 12th, 2001, 19:15
in both of them it states that you put in the ip address of your site, what if your site is on free web space whats the ip then? Or if not what do you do?
meow
May 12th, 2001, 22:14
Oops. I don't think you need the IP. I know I have got it to work. Check this variant:
http://webnests.com/bandwidththeft.htm
Or go to http://www.cgi-resources.com/ or some other CGI directory and search for "bandwidth" and you'll find a bunch of scripts.
Sorry, I don't find the .htaccess I used. But I definitely didn't have my own IP.
Weapon
May 12th, 2001, 22:54
Originally posted by meow
Oops. I don't think you need the IP. I know I have got it to work. Check this variant:
http://webnests.com/bandwidththeft.htm
Or go to http://www.cgi-resources.com/ or some other CGI directory and search for "bandwidth" and you'll find a bunch of scripts.
Sorry, I don't find the .htaccess I used. But I definitely didn't have my own IP.
On the first link it shows:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$ [NC]
RewriteRule .*\.gif$ - [F]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$ [NC]
RewriteRule .*\.jpg$ - [F]
Do you think it will still work if the files are zip and other format besides jpg and gif?
Weapon
May 12th, 2001, 23:04
Damn I tried that thing now my site don't even work at all, might just be my browser so can you guys check? its at http://www.otashki----------
meow
May 12th, 2001, 23:59
Sh*t! IE just connects, connects, connects... :eek:
Where do you have the site? You can get in with ftp I hope?
Weapon
May 13th, 2001, 00:36
I have it at hypermart and yes I can access the ftp, the OTHER address is otashki.hypermart.net
meow
May 13th, 2001, 00:45
Have you tried to delete the .htaccess file?
Boy, I feel like this is my fault.
meow
May 13th, 2001, 03:00
Hey Weapon, can you see the .htaccess file with ftp? If not, do you know how to get rid of it? *worried* - no smilie for that
Weapon
May 13th, 2001, 03:30
nothing to worry about, I can still edit, delete and do all the other stuff with the .htaccess ,but I just can't get it to work. Is there like something special you have to do? put it in a certain dir? or anything else i need to know
meow
May 13th, 2001, 06:19
Thank heavens. :)
Normally a .htaccess files affects the directory in which it is contained and those below that one in the structure. Like for password protection you dump it in the directory you want to protect. So I guess in this case the root would be a good place.
Maybe the server doesn't allow this kind of fun and that's why it screws up. Or have you managed to make your whole site protected? :D
Weapon
May 13th, 2001, 14:59
I did try some variations and the site works, but then the pictures don't show up
Weapon
May 13th, 2001, 23:54
I got a variation which looks something like this:
<FilesMatch "\.(gif|jpg)">
allow from otashki.hypermart.net
</FilesMatch>
yet it still don't work any suggestions?
meow
May 14th, 2001, 17:25
I tried this on f2s:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !>http://www.blah.f2s.com [NC]
RewriteRule /* http://www.blah.f2s.com/bad.html [R,L]
Same result as you. Can't link to the images, but they don't show up on my page either.
If I find the old one I used I'll post it. Think it was on myscgiserver. Guess you have to settle for a CGI.
JALman
May 15th, 2001, 23:29
Originally posted by meow
I tried this on f2s:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !>http://www.blah.f2s.com [NC]
RewriteRule /* http://www.blah.f2s.com/bad.html [R,L]
Same result as you. Can't link to the images, but they don't show up on my page either.
If I find the old one I used I'll post it. Think it was on myscgiserver. Guess you have to settle for a CGI.
Have you added forward slashes next to the periods? I have tried the same thing like you all but I've found out that the periods must have forward slashes (periods should be literal, I think) next to it or you won't be able to have images on your own site. Like so:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://domain\.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www\.domain\.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://12\.345\.678\.901.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://12\.345\.678\.901:80.*$ [NC]
RewriteRule .*\.(gif|GIF|jpg|JPG)$ - [F]
This is in my .htaccess file on my site. I would also include my IP address too, but it's optional. It should work now.
meow
May 16th, 2001, 01:30
You mean back slash? "\" Yeah, they're part of the regexp. Means "match what's coming after exactly" or something similar.
Don't trust me but I think it's something like this
. any carchter
* 0-any times
So, "match any number of any characters followed by exactly .gif"
I think I used this:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !>http://www.blah.f2s.com [NC]
RewriteRule /* http://www.blah.f2s.com/bad.html [R,L]
RewriteRule .*\.gif$ - [F]
RewriteCond %{HTTP_REFERER} !>http://www.blah.f2s.com [NC]
RewriteRule /* http://www.blah.f2s.com/bad.html [R,L]
RewriteRule .*\.jpg$ - [F]
I'll test yours.
lucifer
May 16th, 2001, 09:05
Originally posted by meow
You mean back slash? "\" Yeah, they're part of the regexp. Means "match what's coming after exactly" or something similar.
\ is an escape character to do special things to the char after
eg
\n = newline
\t = tab
things that are already special
. anything
+ one or more
? minimal
become themselves after a \
so
\. = full stop/period
\\ = slash
you can backslash anything not a number/letter and it'll be itself
meow
May 16th, 2001, 09:50
You express it so much better. And me thinks know it a lot better. ;)
Weapon
May 16th, 2001, 15:17
Damn it, still doesn't work. Would go for a cgi but then it doesn't work with my image script and I will have to redo every link!
meow
May 17th, 2001, 03:45
Well, it could be we do it right (at times anyway) but server isn't configured to allow mode-rewrite. If your host has decent support you could ask. If they allow .htaccess they often limit what it can be used for. Can't see why. :rolleyes:
meow
May 17th, 2001, 22:13
Came to think...if the anti leech scripts screw things up, have you tried one of those remotely hosted? Saw a bunch at cgiresourceindex. Maybe worth a try.
Weapon
May 18th, 2001, 02:07
does hypermart support these fucntions? anyway cgi anti-leech script don't work with my image script. Anyone know a paid or free webhost that supports that?
meow
May 19th, 2001, 02:34
I don't know...but I meant _remotely_hosted_ as in ran on another server. I don't know if this makes any difference, but you could check it out. I guess it's just a matter of pasting a few tags in as usual so it wouldn't hurt. There are several at:
http://cgi.resourceindex.com/Remotely_Hosted/Miscellaneous/
Weapon
May 19th, 2001, 04:51
I don't really won't remotly hosted because then I will have to change all the link on my site and I have quite alot. And with .htaccess I just have to upload one fill and it is done, but that is if only i get it to work.
Weapon
May 21st, 2001, 07:13
come on, someone please help me. if .htaccess doesn't work there must be another similar way (besides cgi/php etc...)So anyone know?
eggman
June 2nd, 2001, 10:17
D'ya think that could be used for the crosswinds thingy; you know, remote file linking.:)
Powered by vBulletin® Version 4.1.7 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.