Scott Penrose пишет:

>
> On 01/08/2006, at 15:50, Vladimir S. Tikhonjuk wrote:
>
>>
>> So, as I understant, If I want authenticate user before seeing every
>> page, I have to put
>>
>> <Location />
>> PerlAuthenHandler Promtelecom::Authentication
>> AuthType Basic
>> AuthName "Promtelecom Network"
>> Require valid-user
>> </Location>
>>
>> to be the first one.
>>
>> Then, If I want DebitorDocuments Handler (
>> http://localhost/debitor/documents ) invoked without Debitor handler, I
>> have to put it before DebitorHandler ?
>> And vise versa: If I want Debitor Handler and then DebitorDocuments
>> Handler to be invoked when I go to http://localhost/debitor/documents,
>> the Debitor Handler have to stand before DebitorDocuments Handler in
>> httpd.conf ?
>
>
> Only one handler will run - not both. But otherwise yes.
>
> Basically for each section of Apache, one thing wins. Mostly you can
> think of sections as Authentication, Authorization, and Handler (there
> are others of course, especially filters, fixup handlers and more -
> but the first three are the most common).
>
> So if you have:
>
> <Location />
> Auth...
> <Location /debitor/documents>
> Handler Debitor::Documents
> <Location /debitor>
> Handler Debitor
>
> Then the Auth handler will not be effected by the other entries
> because they are not changing that slot - the Auth Slot.
> But you are changing the Handler slot - and then the order is
> important - but only one will run.
>
> So if you did it in the order you had in your original mail - the
> Debitor::Document handler would never get run.
>
> Hope that kind of makes sense.
>
> Scott

O.K. Thanks for answer :)
I want to write rather big project. How I have to construct it: I mean,
should I make a lot of handlers, like, /debitor, /debitor/documents,
/debitor/documents/contracts .... Or, create *.pl scripts. Or may be
there is another theory ?

Reply via email to