The time now is 09/07/08 - 19:25
Log in: Username: Password:
Search forums for:
  

.htaccess ownage

Post new topic   Reply to topic
Author Message
khrath
RealPoor Master of Posts
RealPoor Master of Posts


Joined: 11 Oct 2002
Posts: 8750



PostPosted: 04/14/04 - 03:16    Post subject: .htaccess ownage Reply with quote

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?realpoor.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.goat.cx/hello.jpg [R,NC]



Anyone who hotlinks an image from the directory this is in, unless it's being linked from realpoor, will get a goatse instead of the pict they wanted to link.

Such ownage.
Back to top
Finigan
RealPoor Guru
RealPoor Guru


Joined: 11 Oct 2002
Posts: 3817



PostPosted: 04/14/04 - 03:37    Post subject: Reply with quote

What are they gonna link? the realpoor logo?

Not much image-wise is hosted on realpoor.
Back to top
khrath
RealPoor Master of Posts
RealPoor Master of Posts


Joined: 11 Oct 2002
Posts: 8750



PostPosted: 04/14/04 - 03:41    Post subject: Reply with quote

no man....

It isn't something custom tailored FOR realpoor, it just has a line excluding realpoor from the hotlink limitation

You can put those lines in any folder that supports .htaccess

anyone who links a picture from anywhere that is NOT realpoor.com, will see a goatse instead.

I host alot of pics that get used here, so naturally wanted to allow realpoor to link my pictures.

any other site that requests one however, geets a goatse.

www.khrath.com/images/ is locked down to everyone but realpoor.
Back to top
Finigan
RealPoor Guru
RealPoor Guru


Joined: 11 Oct 2002
Posts: 3817



PostPosted: 04/14/04 - 03:50    Post subject: Reply with quote

Oh oks now I understand.

But what if they wanted to link the goatse pic?
Back to top
khrath
RealPoor Master of Posts
RealPoor Master of Posts


Joined: 11 Oct 2002
Posts: 8750



PostPosted: 04/14/04 - 03:52    Post subject: Reply with quote

check the refer link, it's not hosted by me to begin with, so link all they want
Back to top
Finigan
RealPoor Guru
RealPoor Guru


Joined: 11 Oct 2002
Posts: 3817



PostPosted: 04/14/04 - 04:00    Post subject: Reply with quote



Awesome! thanks!
Back to top
Display posts from previous:   
Post new topic   Reply to topic
Page 1 of 1

Related topics:
apache windows .htaccess question