[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modules
Subject:    Re: [apache-modules] directory info
From:       Nelio Alves Pereira Filho <nelio () ifx ! com ! br>
Date:       2000-11-02 13:09:59
[Download RAW message or body]

Thanks, I got it.

Now I have another problem: I want to know the directory relative to the
document root. For example:

DocumentRoot /docs

<directory /docs/test>
..........
</directory>


In this example I want to get only /test. Well, I can do that if I know where
is stored the DocumentRoot value. I looked briefly at the include files, but
I couldn't find where it is and how access it throught a module.


Also, I would like that this works with virtualhosts.. I think it's not quite
different, probably there'll be a variable that stores the root of the
current host, whether it's virtual or not.

Well, if anyone could help, I would apreciate a lot.

Nelio Alves Pereira Filho
IFX Brazil


Sven Staible wrote:

> Hi,
>
> you have 2 possibilities to get the path information of a container
> directive (location, directory):
>
> You can get it as a parameter to the function which creates your directory
> specific configuration. The declaration of the function is as following:
>
> void *(*create_dir_config) (pool *p, char *dir); // see typedef of module
>
> The 'dir' argument contains the path information. You can then store it to
> your directory specific configuration if you wish.
>
> You also get it with each callback to your directives. The cmd_parms
> parameter has a member called 'path' which contains the path of the
> surrounding directory.
>
> Sven
>
> > Hi there.
> >
> > I am quite new about developping apache modules. My question: how can
> > I obtain the directory name of a directoty configuration? For instance:
> >
> > <directory /mydir>
> >
> > mymodule directives
> >
> > </directory>
> >
> >
> > Inside mymodule, I want to get the name '/mydir'.
>
> --
> ----------------------------------------------------------------
> Apache Modules Mailing List            675 currently subscribed
> ----------------------------------------------------------------
>
> If you wish to be removed from this list, send the word
> 'unsubscribe' to: apache-modules-request@covalent.net

--
----------------------------------------------------------------
Apache Modules Mailing List            672 currently subscribed
----------------------------------------------------------------

If you wish to be removed from this list, send the word
'unsubscribe' to: apache-modules-request@covalent.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic