GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   htaccess ??? (https://gfy.com/showthread.php?t=377591)

fusionx 10-26-2004 09:38 AM

htaccess ???
 
My hotlink and redirect stuff is working fine.

But, I'm seeing another fusker in my logs, and would LOVE to have a line in the .htaccess that returns a specific image IF a referring domain contains one of the following keywords:

fusker, ripper

BTW - the newest site to be trying to hit me is ripper.webrats.com

I want to return goatse or tubgrl when they request pics.

Anyone have that specific line of code?

Maybe I'll make seperate entries and watermark the image "******* brought to you by ripper.webrats.com!", etc..

I don't care about the bandwidth this costs me.

TIA

:Graucho

WebHead 10-26-2004 09:47 AM

Here's a nice little tutorial to help you out:
http://www.javascriptkit.com/howto/htaccess7.shtml

Hope that helps :)

fusionx 10-26-2004 09:50 AM

Thanks WebHead

That has the redirect part, but not the part that determines the specific referrer. I don't want to blast everyone with goatse - just a few specific assholes :)

ok - bad choice of words there...

WebHead 10-26-2004 10:01 AM

Oh ok, so you just need basically an "If, then Else" statement added to do that. drudged around and found this easy to follow tutorial for you to explain how to accomplish just that. Will be a bit of reading, but they have great examples and you will get the idea. It will basically tell the .htaccess file that is XXX hits XXX then send it to XXX, otherwise everyone else goes to XXX, etc.

http://www.vnwr.com/resources/tutorials/htaccess.html

Hope that is more of what you are looking for. :BangBang:

fusionx 10-26-2004 11:44 AM

I think you made my day :)

It looks like I can use something like:

PHP Code:

RewriteCond %{HTTP_REFERER} ^http://ripper.webrats.com/.*$ [NC]
ReWriteRule .*\.(jpg|gif)$ http://www.mydomain.com/hotlink/goatse4ripper.jpg    [F] 

and it shouldn't redirect any other referrers to the specified image.

I'll try it tonight and see what I can break :)


All times are GMT -7. The time now is 07:19 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123