DreamHost Web Hosting
Discussion Forum


Forums
   >> General Troubleshooting
Flat Mode*

Subject Re: RewriteCond %{HTTP_REFERER} not working .htacc [re: jmorty732]  
Posted byanonymous2 (DH Enthusiast)
Posted on12/01/06 06:09 AM


RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://cgi.ebay.com/
RewriteRule /* http://www.yoursite.com/restricted_url.html [R,L]
RewriteCond %{HTTP_REFERER} ^http://cgi.ebay.co.uk/
RewriteRule /* http://www.yoursite.com/restricted_url.html [R,L]

That's a minor tweak to a copy paste from the wiki. If that doesn't work, I'm giving up for now (sorry).

You'd need to put up a restricted_url.html page or live with 404's, I suppose. A page would deliver an appropriate message if you wanted.

A referer blocker is something that removes or modifies referers being sent by your browser. For example Firefox has a plugin and some firewalls can do it. A standard setting might be to always send a referer of the homepage of the site being requested from (i.e. your site in this case). If you (or someone else) were using one, it could prevent what you're trying to accomplish.

--

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



 
Entire thread
Subject  Posted byPosted on
*RewriteCond %{HTTP_REFERER} not working .htaccess  jmorty73211/30/06 08:32 PM
.*Try this -- as a test.  seiler12/01/06 09:58 AM
.*Re: Try this -- as a test.  jmorty73212/01/06 10:42 AM
.*Re: Try this -- as a test.  jmorty73212/01/06 10:50 AM
.*Re: Try this -- as a test.  seiler12/01/06 11:07 AM
.*Re: Try this -- as a test.  anonymous212/01/06 12:23 PM
.*Re: Try this -- as a test.  seiler12/01/06 12:56 PM
.*Re: Try this -- as a test.  jmorty73212/01/06 11:42 AM
.*Re: Try this -- as a test.  seiler12/01/06 12:07 PM
.*Re: Try this -- as a test.  kchrist12/01/06 11:54 AM
.*Re: Try this -- as a test.  jmorty73212/01/06 12:09 PM
.*Re: Try this -- as a test.  seiler12/01/06 12:25 PM
.*Re: Try this -- as a test.  jmorty73212/01/06 12:36 PM
.*Re: Try this -- as a test.  anonymous212/01/06 12:51 PM
.*Re: Try this -- as a test.  jmorty73212/01/06 01:19 PM
.*Re: RewriteCond %{HTTP_REFERER} not working .htacc  seiler11/30/06 09:11 PM
.*Re: RewriteCond %{HTTP_REFERER} not working .htacc  jmorty73212/01/06 04:49 AM
.*Re: RewriteCond %{HTTP_REFERER} not working .htacc  anonymous212/01/06 05:03 AM
.*Re: RewriteCond %{HTTP_REFERER} not working .htacc  seiler12/01/06 09:52 AM
.*Re: RewriteCond %{HTTP_REFERER} not working .htacc  jmorty73212/01/06 05:15 AM
..Re: RewriteCond %{HTTP_REFERER} not working .htacc  anonymous212/01/06 06:09 AM
.*Re: RewriteCond %{HTTP_REFERER} not working .htacc  jmorty73212/01/06 06:37 AM
.*Re: RewriteCond %{HTTP_REFERER} not working .htacc  scjessey12/01/06 07:27 AM
.*Re: RewriteCond %{HTTP_REFERER} not working .htacc  jmorty73212/01/06 08:24 AM
.*Re: RewriteCond %{HTTP_REFERER} not working .htacc  anonymous212/01/06 07:18 AM
.*Re: RewriteCond %{HTTP_REFERER} not working .htacc  jmorty73212/01/06 08:36 AM
Jump to