Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Apache2 Mod_perl 2 without a endless loop of redirect

by TOD (Friar)
on Apr 25, 2008 at 03:12 UTC ( [id://682750]=note: print w/replies, xml ) Need Help??


in reply to Apache2 Mod_perl 2 without a endless loop of redirect

to actually recognize where the redirect loops come from i should have to take a look at the /etc/apache2/sites-available/xxx.conf file. i assume that there you define your Apache2::AuthClients module to be the content handler for your site. thus every request to the location described in that config file will be answered by your module.
however, there are two ways for solving your problem: 1) use the $r->internal_redirect_handler method. you'll find an explanation of it in the docs on Apache2::SubRequest. 2.) why do you return an OK when actually you want a redirect? there is a http response code indicating a redirect: 301 (permanent redirect, probably not what you need), and 302 (temporary redirect). i don't know for the moment what the Apache2::Const denotations are, but a quick glance at the docs on Apache2::Response revealed a method called $r->custom_response which might be of a help.
--------------------------------
masses are the opiate for religion.

Replies are listed 'Best First'.
Re^2: Apache2 Mod_perl 2 without a endless loop of redirect
by perrin (Chancellor) on Apr 25, 2008 at 05:04 UTC
    The return codes from apache handlers are not the same as HTTP codes. Some of them are for historical reasons, but it can't be counted on. HTTP codes are used in the headers and apache constants are used as handler return values.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://682750]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2024-04-18 17:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found