httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Nerad <jne...@cimedia.com>
Subject Re: Redirect from site1 to site2 getting site1 as referrer (was Re: mod_rewrite)
Date Wed, 24 Apr 2002 21:19:48 GMT
On Wednesday 24 April 2002 14:27, Joshua Slive wrote:
> On Wed, 24 Apr 2002, Jack Nerad wrote:
> > Would
> >
> > Something like
> >
> > [site1]
> > RewriteEngine On
> > RewriteRule ^(.*) http://www.site2.com/redirectedfromsite1 [R]
> >
> > [site2]
> > RewriteEngine On
> > RewriteRule ^(.*)/redirectedfromsite1 $1 [E=HTTP_REFERER:site1]
> >
> > work?
>
> No, for two reasons:
>
> 1. You can't change the "built-in" environment variables that way.
> You could, of course, set a variable like NEW_HTTP_REFERER.
>

I must not understand the distinction between the environment variables 
you are speaking of.  When I tried that and put <!--#echo 
var="HTTP_REFERER" --> it did echo what I put in the rewrite rule.  The 
same variable also printed the correct information when I made a link 
to it from another page.  Could you elaborate?


> 2. Even if you did that, it wouldn't help the problem because anyone
> saving that link would also get through without going through the
> first site.  That defeats the intended restriction.
>

Good point.  There might be a way to make that new url value rotate or 
be generated randomly per paired request.  Security through environment 
variables isn't much in the way of security, though. 

> Joshua.

--
Jack

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message