View Full Version : .htaccess - anti-leech help!!
I have anti-leech set up on my website, which works just fine except for one thing. Whena user goes to one of my form pages, which are set up with SSL, the logo and the page bg don't come in because of them being called from ...
https://asteroid.powweb.com:8103/EList2.html
At least I know the anti-leech is working lol :)
Any ideas how I can get around this problem without getting rid of the anti-leech in my .htaccess??
Thanx
The LabRat
alphadesk
5-12-02, 02:09 AM
Try this,
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.mydomain.com/nasty.gif [R,L]
With "nasty" being your logo or the pic you need. Make sure you give it the full path if you have it in images folder.
You might also try adding this line to your pre-existing anti-leech code:
RewriteCond %{HTTP_REFERER} !^https://asteroid.powweb.com:8103/ [NC]
I'm not sure if that would work or not, but it's worth a shot as you need both the background image and your logo.
Let us know if this works!
bummer, I tried both ways with no success.
Thanx for the try though :)
Where is the .htaccess located in your site and what anti-leech coding are you using?
its located in my htdocs dir
I'm using the code off your unofficial powWeb support site...
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://yousite.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yousite.com/ [NC]
RewriteRule [^/]+.(gif|jpg)$ - [F]
... which works great :)
LabRat
How's your site set up? Do you have a single main images folder under htdocs? I'm asking to see if there is a workaround we can get running on your site.
Originally posted by MannInc
How's your site set up? Do you have a single main images folder under htdocs? I'm asking to see if there is a workaround we can get running on your site.
Yes my htdocs currently has these folders.....
/images
/audio
/webstats
still in process of building website, more folders to come ie.,
/video
/forums
/chat
etc., etc.
I got to tell you, because of folks like you and others around here, I'm sure learning a heck of alot of great stuff. It sure is appreciated. :)
Im crashin, gonna go to the coast tomorrow and get away from this computer for the day, uh wait, its already tomorrow ::)
Thanx much
LabRat
Good deal. If all you have in the .htaccess file is the anti-leech code, try this:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /images/
RewriteCond %{HTTP_REFERER} !^http://yousite.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yousite.com/ [NC]
RewriteRule [^/]+.(gif|jpg)$ - [F]
Than make a copy of the two images you need for the secure page available in the htdocs folder.
Let me know if this works for you.
Nope, it didn't work.
I took the code out of my htaccess for now so it doesn't interfere with the layout on my SSL pages.
I appreciate the help man, i'll keep checkin back to see if there's new ideas. I have a feeling the scripting in htaccess won't have a work-around with an SSL page??
Thanx :)
LabRat
vBulletin v3.6.0, Copyright ©2000-2010, Jelsoft Enterprises Ltd.