Re: getting URL of refused page, after OnDeny

2001-07-08 Thread wald


> Can you set up a custom error document handler and redirect to that, 
> rather than using your OnDeny?  Return something like 409
> ("Conflict"), and Apache will do an internal redirect, from which
> you can get the requesting URI in the same way that you can in
> other redirects.
> 

> Actually, how is the require handled? What does your auth handler
> return if the user is not subscribed?  Can/does your handler do an
> internal redirect?

I do (in my C handler):
ap_table_set (r->headers_out, "Location", sec->auth_LNonDeny);
return REDIRECT;

your suggestion sounds good, off to hit my books to see how to do that -
sounds like a good solution (never done an internal redirect - I think -))
  thanks for the pointer,  
  Bob Waldstein   [EMAIL PROTECTED]





Re: getting URL of refused page, after OnDeny

2001-07-06 Thread darren chamberlain

[EMAIL PROTECTED] <[EMAIL PROTECTED]> said something to this effect 
on 07/06/2001:
>   my setup:  I have files in a directory, that a user can only get if
>   subscribed. My apache is hacked with both C and mod_perl
>   enhancements to authentication/authorization. My .htaccess
>   looks as follows:
>   AuthName "library services"
>   AuthType Basic
>   
>   require subscribe idc
>   OnDeny http://myserver/refusals/idc.html
>   
> 
>   the problem: when a unsubscribed user tries to go to:
>   http://myserver/protected-dir/document.pdf
>  and gets bounced to the refusal/subscription page (idc.html) I would
>  like to know the refused page (/protected-dir/document.pdf) so I can
>  send them back there when they subscribe.
> 
>   I don't see any way to carry this infomation? Am thinking about hacking
> more so I can have an OnDeny line like
>   OnDeny http://myserver/refusals/idc.html?refused=$URI
> 
> but feel like I am probably missing something!  THanks for any pointers,

Can you set up a custom error document handler and redirect to that,
rather than using your OnDeny?  Return something like 409
("Conflict"), and Apache will do an internal redirect, from which
you can get the requesting URI in the same way that you can in
other redirects.

Actually, how is the require handled? What does your auth handler
return if the user is not subscribed?  Can/does your handler do an
internal redirect?

(darren)

-- 
Small pleasures exclude great ones.



getting URL of refused page, after OnDeny

2001-07-06 Thread wald


  my setup:  I have files in a directory, that a user can only get if
subscribed. My apache is hacked with both C and mod_perl
enhancements to authentication/authorization. My .htaccess
looks as follows:
AuthName "library services"
AuthType Basic

require subscribe idc
OnDeny http://myserver/refusals/idc.html


  the problem: when a unsubscribed user tries to go to:
http://myserver/protected-dir/document.pdf
 and gets bounced to the refusal/subscription page (idc.html) I would
 like to know the refused page (/protected-dir/document.pdf) so I can
 send them back there when they subscribe.

  I don't see any way to carry this infomation? Am thinking about hacking
more so I can have an OnDeny line like
OnDeny http://myserver/refusals/idc.html?refused=$URI

but feel like I am probably missing something!  THanks for any pointers,
Bob Waldstein  [EMAIL PROTECTED]