> Yes I know whether I would return an OK or a FORBIDDEN under different
> conditions.
> My questions is,when return OK,what should I do on next step?How can I
> send the file to clients?Do I need a redirect?When using
> redirect,clients may also get the real file path by guess,isn't it?
By using a PerlAccessHandler, you are adding a step into the standard
apache process.
So:
- the user goes to: /path/file.xyz
- your access handler performs its checks
- Allowed?
- Y :
- return OK
- file served by standard apache means
- N :
- return DENY
- apache sends a 403 (or whatever) response
All you are doing is replacing (or adding to) mod_access - your module
works in exactly the same way.
Also, you could use your handler at the same time as mod_access, so you
could (eg) use mod_access to check IP addresses, and your handler to
check something else, if you like.
Clint