httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <>
Subject Re: mod_rewrite
Date Wed, 24 Apr 2002 15:44:08 GMT
Martin Marusinec <> 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,
> >
> >
> > When someone will go from to, I want Apache
> > to redirect the request to Till now it is simple. But I
> > want to have access control based on referer, that people cannot go directly
> > to, only if they go from 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
> >
> > Is it possible to tell mode_rewrite to update the field, or to set it by
> > some configuration directive in httpd.conf file?

A workaround might be to use your apache server as a proxy (this is not
strictly a redirect...) Enable mod_proxy and then use the [P] flag in
the rewrite rule. Then your server will request the page from the second
server and so it will see whatever you use as REFERER. Read the
mod_proxy and RewriteRule docs for details. Bear in mind your server
will have double load for anything it fetches by proxy (once to get it
and once to serve it).


Owen Boyle.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message