RewriteCond %{HTTP_REFERER} not working .htaccess

[quote]So give this a click and see where it gets you.

[/quote]

Thanks for that. It answered another question I had, which was: If somebody follows a “blocked” link, and then hits return on the URL (navigation toolbar or whatever called), will the referer continue to be sent and blocked, or will the page display? The answer is: the page will display. OTOH, hitting reload does continue being blocked.

[quote]And I never agreed to have my site used as a “demo”.

[/quote]

You could use it as an opportunity to advertise your modified version.

They recently hired more support help.
DreamHost Customers wiki And Forum

Then scratch blocking an IP, since ebay users can be anywhere.

If he won’t respect your wishes… Then why block, when you could just redirect to porno/beastiality sites, then report him to ebay for linking to offensive material? :stuck_out_tongue:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} !(.googlebot.|.slurp.) [NC]
RewriteCond %{HTTP_REFERER} ^http://(cgi.)?ebay.co(.)$ [NC]
RewriteRule .
http://INSERT-BEASTIALITY-URL-HERE [R,L]

That lets google & yahoo past ( I was too lazy to look up the exact user-agents). A link’s a link… no sense in blocking the good guys. :wink:


:stuck_out_tongue: Save up to $96 at Dreamhost with ALMOST97 promo code (I get $1).
Or save $97 with THEFULL97.

Yeah, trust me, I have thought of reporting him (or her) to Ebay, but I want to try and find a way without getting him in trouble with ebay, and without offending the customers. I figured a nice “403” would do.

I don’t think the “offense” is that bad, and I try to give people the benefit of the doubt (maybe my messages are being dropped in the spam block folder, or maybe he doesn’t check that email account, etc). I don’t like messing with someone’s revenue source, cus if someone messed with my web site revenue it would devastate me financially, you know the whole karma thing.

Thanks for your help, I truly appreciate it.

(I still can’t beleive it was Norton this entire time and I didn’t think of it).

[quote](I still can’t beleive it was Norton this entire time and I didn’t think of it).

[/quote]

Yeah, me neither, especially when I discussed referer blocking and mentioned firewalls, hours ago. :slight_smile:

You have to chuckle when you foul yourself up and spend a lot of time trying to mess with somebody else.

They recently hired more support help.
DreamHost Customers wiki And Forum

Correct. It’s the same level of security (read: inconvenience) that prevents hotlinking.

With the 403 in this case, you have to hope that either:

  1. That’s enough to turn off a possible bidder, that maybe hits refresh once (and doesn’t think to simple hit enter or the go button). A potential bidder could see the error as a problem with the script that they were considering bidding on and lose interest in the auction (good reason for the seller to find a new ‘demo’ site).

  2. The seller isn’t a jerk that changes the link to “Copy & paste this URL in your browser.” Then you’re pretty much screwed, unless you want to dedicate part of your homepage to calling the seller a jackass and linking the person to a place where he/she can get the script for free. :wink:

That’s why I’d take the more fun route of redirecting to porn or beastiality … let them refresh all they want. :stuck_out_tongue: And in that case (unless he goes plain text instead of link), he’ll surely get several ebay complaints about it.

If you wanted to go through more trouble, you could grab the person’s IP on the first block, then block that with a script, which would block a second attempt by hitting enter. Use cookies, etc… But like blocking a blank HTTP_REFERER, you chance blocking wanted traffic as well. Personally, I wouldn’t go through all that trouble unless there was a serious problem with stealing bandwidth–which probably isn’t the case here with a few ebay links.


:stuck_out_tongue: Save up to $96 at Dreamhost with ALMOST97 promo code (I get $1).
Or save $97 with THEFULL97.

LOL

BTW, I didn’t ignore your comment about the firewall. I disabled Norton, looked at the settings in my browser and tried the links and it still didn’t work.

It wasn’t until I saw the link that seiler provided where the blocking was confirmed, and when it didn’t work for me, I decided to dig into the firewall issue further.

I had to manually set Norton to not block referrals to the domain. That’s when it worked.

Thanks for your help, I do appreciate it. :slight_smile: