Forum Moderators: coopster & phranque

Message Too Old, No Replies

cgi direct linking - preventing

         

veredgf

8:28 pm on Jan 12, 2003 (gmt 0)



Hi,

I've searched around and also tried to use a method that will prevent other sites from running some of the cgi scripts hosted on mine.

I thought i could do this with.htaccess... but either i wrote the .htaccess wrong... or there's something I'm missing...

This is the .htaccess:

RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://(mysite\.)?domain.com/.*$ [NC]
RewriteRule \.(gif¦jpg¦cgi)$ http://mysite.domain.com/vbrush/images/kidding.jpg [R,L]

My domain is essentially a subdomain - mysite.domain.com. I thought maybe this can be a problem...

I also uploaded the .htaccess to a subfolder within my cgi-bin... possibly this may be wrong?

All'n'all I could run scripts when this version of .htaccess was on the server...

Any ideas? if the .htaccess is not the trick - any other method?

Thanks :-)

Vered

[edited by: jatar_k at 9:10 pm (utc) on Jan. 12, 2003]
[edit reason] removed specifics [/edit]

jatar_k

8:38 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



welcome to WebmasterWorld veredgf,

not my area of expertise but this post will put it back in their line of vision.