httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Marusinec" <mat...@beau-monde.com>
Subject RE: mod_rewrite
Date Wed, 24 Apr 2002 15:56:06 GMT
Hello,

hm, I see that Apache really has no control over that.
How can I solve that problem? (I mean, how to put it working?)
Will JavaScript redirect work in way as I want?

Martin

-----Original Message-----
From: Hans Juergen von Lengerke [mailto:lengerkeh@sixt.de]
Sent: Wednesday, April 24, 2002 4:12 PM
To: users@httpd.apache.org
Subject: Re: mod_rewrite


mod_rewrite cannot rewrite the Referrer field. It works like this:

  Browser sends request to Server (site1):

     GET / HTTP/1.1
     Host: site1.domain.com
     Referrer: http://www.linking.site/linking_doc.html
     ... other headers ...

  Server responds with redirect (due to your RewriteRule):

     HTTP/1.1 302 Found
     Location: http://site2.domain.com/
     ... other headers ...

  Browser thus sends request to site2:

     GET / HTTP/1.1
     Host: site2.domain.com
     Referrer: (whatever the _browser_ decides to send)
     ... other headers ...

I don't actually know what the browser does in this case, but it doesn't
matter. The point is, that the server has no control over what the
browser does.

HTH, Hans


Martin Marusinec <mathew@beau-monde.com> on Apr 24, 2002:

> Hello,
>
> I have a problem, I would like to ask, if someone can help me with that.
>
> I want to use redirection on my server, with mod_rewrite, but I want it,
> while rewriting the URI, to update also HTTP_REFERER field, as I found,
the
> referer is still the same.
> I can desribe what I want, by this example:
> I have two sites,
> site1.domain.com
> site2.domain.com
> When someone will go from some.where.com to site1.domain.com, I want
Apache
> to redirect the request to site2.domain.com. Till now it is simple. But I
> want to have access control based on referer, that people cannot go
directly
> to site2.domain.com, only if they go from site1.domain.com. Without
> redirection, it works, just click on a page. With redirection, the
> mod_rewrite does not change the HTTP_REFERER field, so it lookslike
someone
> goes directly from some.where.com.
>
> Is it possible to tell mode_rewrite to update the field, or to set it by
> some configuration directive in httpd.conf file?
>
> Thanks,
>
> regards,
> Martin Marusinec
>
>
> ---------------------------------------------------------------------
> 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
>



---------------------------------------------------------------------
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



---------------------------------------------------------------------
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