I'm writing an Access Module (PerlAccessHandler), and within the Access Handler
I'm trying to do similar to an Internal Redirect, using Custom Response. ie;
$r->custom_response(FORBIDDEN,"/the/other/URI");
return FORBIDDEN;
The effect I'm after is, depending on certain conditions, a different page will
be shown (without a change in the URL). Part of the problem is this happens
during the Access phase, and I cannot override the normal Handler phase (due to
this being used with CGI's, etc...).
Things all work as they should, except where the URI is for a directory, and
thus using DocumentRoot to derive the filename. It DOES derive the correct
filename, but redirecting using custom_response does NOT seem to work at all
when accessing a URI directory. Instead of the target URI being shown, you get
the standard FORBIDDEN handler. ie; It's ignoring the custom_response
handler...
What's going on here, and how can I fix it? ^_^
Are there any alternative ways to redirect internally at the Access phase?
Thanks in advance...
--
. Trevor Phillips - http://jurai.murdoch.edu.au/ .
: Web Systems Administrator - T.Phillips@murdoch.edu.au :
| IT Services - Murdoch University |
>------------------- Member of the #SAS# & #CFC# --------------------<
| On nights such as this, evil deeds are done. And good deeds, of /
| course. But mostly evil, on the whole. /
\ -- (Terry Pratchett, Wyrd Sisters) /
I'm trying to do similar to an Internal Redirect, using Custom Response. ie;
$r->custom_response(FORBIDDEN,"/the/other/URI");
return FORBIDDEN;
The effect I'm after is, depending on certain conditions, a different page will
be shown (without a change in the URL). Part of the problem is this happens
during the Access phase, and I cannot override the normal Handler phase (due to
this being used with CGI's, etc...).
Things all work as they should, except where the URI is for a directory, and
thus using DocumentRoot to derive the filename. It DOES derive the correct
filename, but redirecting using custom_response does NOT seem to work at all
when accessing a URI directory. Instead of the target URI being shown, you get
the standard FORBIDDEN handler. ie; It's ignoring the custom_response
handler...
What's going on here, and how can I fix it? ^_^
Are there any alternative ways to redirect internally at the Access phase?
Thanks in advance...
--
. Trevor Phillips - http://jurai.murdoch.edu.au/ .
: Web Systems Administrator - T.Phillips@murdoch.edu.au :
| IT Services - Murdoch University |
>------------------- Member of the #SAS# & #CFC# --------------------<
| On nights such as this, evil deeds are done. And good deeds, of /
| course. But mostly evil, on the whole. /
\ -- (Terry Pratchett, Wyrd Sisters) /