httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naaman Musawwir" <naa...@fourthhousesecurity.com>
Subject Re: Redirection in proxy_http.c
Date Fri, 15 Nov 2002 00:27:23 GMT
> "Naaman Musawwir" <naaman@fourthhousesecurity.com> writes:
>
> > Right. In fact, I want to intercept the request in between and want to
> > redirect conditionally to somewhere else instead of where redirected by
> > ProxyPass.
> >
> > BTW where is ProxyPass implemented? I am kind of novice in Apache code
:)
>
> Take a look at function proxy_trans() in modules/proxy/mod_proxy.c.

Thanks, I have looked at that and used the following code to redirect, but
that does not work properly. Only a sub-request gets redirected, but not the
main request. Also this code is called many times when a page is loaded. How
can I stop that? OR should I write this code somewhere else?

if(mycheck) {
        r->proxyreq=PROXYREQ_NONE;
        ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server, "%s",
"************** Redirecting");
        ap_internal_redirect("http://test.fhs.com/httpa/index.html", r);
        return OK;
}

I used this in the function ap_proxy_http_handler() in proxy_http.c.

>
> --
> Jeff Trawick | trawick@attglobal.net
> Born in Roswell... married an alien...
>


Mime
View raw message