httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: mod_rewrite
Date Wed, 24 Apr 2002 15:44:08 GMT
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?

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

Rgds,

Owen Boyle.

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