You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Doug McNutt <do...@macnauchtan.com> on 2009/10/23 21:30:10 UTC

[users@httpd] GET request on a directory

GET requests which would otherwise look for an index.html file but are set up with something like this:

HTTP://domain.com/somedirectory/?C=xx;O=yy

seem to reply with a formatted list of directory contents.  Can someone point me to some documentation for that?  Googling for "?C=M;O=a" gets hundreds of examples but no docs.

-- 
--> So are we going to celebrate the start of a new decade at the end of this year? Or do the tens start at in January 2011? <--

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] GET request on a directory

Posted by André Warnier <aw...@ice-sa.com>.
Eric Covener wrote:
> If the files listed in  DirectoryIndex aren't found
> (http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex),
> and your effective value of the Options directive includes "Indexes"
> (http://httpd.apache.org/docs/2.2/mod/core.html#options), then this
> module shows you a directory listing:
> http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html
> 
> 
> If Options does not include "Indexes", you'll get a forbidden error instead.
> 
> If one of the files in the DirectoryIndex list are present, it's just displayed.
> 

Not even thinking of contradicting what Eric writes above, but just as 
an addition to it :

I think what may confuse you is the following :
In your URL

HTTP://domain.com/somedirectory/?C=xx;O=yy

the part after the "?" is considered not as part of the URL, but as the 
"query string".  So the real URL Apache is looking for is

HTTP://domain.com/somedirectory/

and then, what Eric write above applies.
In other words, you would get just the same result from Apache by 
entering just

HTTP://domain.com/somedirectory/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] GET request on a directory

Posted by Eric Covener <co...@gmail.com>.
If the files listed in  DirectoryIndex aren't found
(http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex),
and your effective value of the Options directive includes "Indexes"
(http://httpd.apache.org/docs/2.2/mod/core.html#options), then this
module shows you a directory listing:
http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html


If Options does not include "Indexes", you'll get a forbidden error instead.

If one of the files in the DirectoryIndex list are present, it's just displayed.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] GET request on a directory

Posted by Doug McNutt <do...@macnauchtan.com>.
At 12:45 -0700 10/23/09, Jonathan Zuckerman wrote:
>On Fri, Oct 23, 2009 at 12:30 PM, Doug McNutt <do...@macnauchtan.com> wrote:
>> GET requests which would otherwise look for an index.html file but are set up with something like this:
>>
>> HTTP://domain.com/somedirectory/?C=xx;O=yy
>>
>> seem to reply with a formatted list of directory contents.  Can someone point me to some documentation for that?  Googling for "?C=M;O=a" gets hundreds of examples but no docs.
>>
>
>Wow, don't even know where to begin.  We're all happy to help but this
>question is nonsensical, can you be any more specific?  This miiight
>be what you're looking for:
>http://httpd.apache.org/docs/2.0/mod/mod_dir.html
>

That's a start and I know more than I did a minute ago.

When I look into a apache log files, I use pair.com as a host, I see the robots doing calls as I describe 

/somedirectory/?C=[S M L D];O=[A D] 

Where the letters after the = signs have no meaning to me. If I experiment with a browser with the same type of URL ending in a directory I get replies that make sense but I am curious about the exact options available. It does look as though I can get more than just modification times and sizes for files in the directory and I'd like to use that information. It appears that an index.html file, if present, takes precedence but I'd like to be sure.

-- 

--> From the U S of A, the only socialist country that refuses to admit it. <--

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] GET request on a directory

Posted by Jonathan Zuckerman <j....@gmail.com>.
On Saturday, October 24, 2009, Doug McNutt <do...@macnauchtan.com> wrote:
>>On Fri, Oct 23, 2009 at 12:30 PM, I wrote:
>>> GET requests which would otherwise look for an index.html file but are set up with something like this:
>>>
>>> HTTP://domain.com/somedirectory/?C=xx;O=yy
>>>
>>> seem to reply with a formatted list of directory contents.  Can someone point me to some documentation for that?  Googling for "?C=M;O=A" gets hundreds of examples but no docs.
>>>
>>>
> At 12:45 -0700 10/23/09, Jonathan Zuckerman wrote:
>>
>>Wow, don't even know where to begin.  We're all happy to help but this
>>question is nonsensical, can you be any more specific?  This miiight
>>be what you're looking for:
>>http://httpd.apache.org/docs/2.0/mod/mod_dir.html
>>
>
> That was the hint I needed. It turns out that
> <http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html>
> has this to say:
>
>     * C=N sorts the directory by file name
>     * C=M sorts the directory by last-modified date, then file name
>     * C=S sorts the directory by size, then file name
>     * C=D sorts the directory by description, then file name
>     * O=A sorts the listing in Ascending Order
>     * O=D sorts the listing in Descending Order
>     * F=0 formats the listing as a simple list (not FancyIndexed)
>     * F=1 formats the listing as a FancyIndexed list
>     * F=2 formats the listing as an HTMLTable FancyIndexed list
>     * V=0 disables version sorting
>     * V=1 enables version sorting
>     * P=pattern lists only files matching the given pattern
>
> The summary seems to say that one can have mod_dir OR mod_autoindex but not both. But it also says that use of index.html is controlled by mod_dir.  I need to get read access to the config file for my hosting service and that might be difficult. A GET aimed at a directory does deliver my own index.html if it's there. But sometimes I don't want to bother with that and apache, as installed by pair.com, does deliver a list of files that a visitor can click on. Is it  _dir or  _autoindex is the question I shall ask.
>
> Thanks for the helping hand.
>
> --
> --> If  it's not  on  fire  it's  a  software  problem. <--
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

And I learned something too, I hadn't realized you could pass
querystring parameters to order results in the automatic index, and
your original question actually makes a lot of sense now

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] GET request on a directory

Posted by Doug McNutt <do...@macnauchtan.com>.
>On Fri, Oct 23, 2009 at 12:30 PM, I wrote:
>> GET requests which would otherwise look for an index.html file but are set up with something like this:
>>
>> HTTP://domain.com/somedirectory/?C=xx;O=yy
>>
>> seem to reply with a formatted list of directory contents.  Can someone point me to some documentation for that?  Googling for "?C=M;O=A" gets hundreds of examples but no docs.
>>
>>
At 12:45 -0700 10/23/09, Jonathan Zuckerman wrote:
>
>Wow, don't even know where to begin.  We're all happy to help but this
>question is nonsensical, can you be any more specific?  This miiight
>be what you're looking for:
>http://httpd.apache.org/docs/2.0/mod/mod_dir.html
>

That was the hint I needed. It turns out that
<http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html>
has this to say:

    * C=N sorts the directory by file name
    * C=M sorts the directory by last-modified date, then file name
    * C=S sorts the directory by size, then file name
    * C=D sorts the directory by description, then file name
    * O=A sorts the listing in Ascending Order
    * O=D sorts the listing in Descending Order
    * F=0 formats the listing as a simple list (not FancyIndexed)
    * F=1 formats the listing as a FancyIndexed list
    * F=2 formats the listing as an HTMLTable FancyIndexed list
    * V=0 disables version sorting
    * V=1 enables version sorting
    * P=pattern lists only files matching the given pattern

The summary seems to say that one can have mod_dir OR mod_autoindex but not both. But it also says that use of index.html is controlled by mod_dir.  I need to get read access to the config file for my hosting service and that might be difficult. A GET aimed at a directory does deliver my own index.html if it's there. But sometimes I don't want to bother with that and apache, as installed by pair.com, does deliver a list of files that a visitor can click on. Is it  _dir or  _autoindex is the question I shall ask.

Thanks for the helping hand.

-- 
--> If  it's not  on  fire  it's  a  software  problem. <--

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] GET request on a directory

Posted by Jonathan Zuckerman <j....@gmail.com>.
On Fri, Oct 23, 2009 at 12:30 PM, Doug McNutt <do...@macnauchtan.com> wrote:
> GET requests which would otherwise look for an index.html file but are set up with something like this:
>
> HTTP://domain.com/somedirectory/?C=xx;O=yy
>
> seem to reply with a formatted list of directory contents.  Can someone point me to some documentation for that?  Googling for "?C=M;O=a" gets hundreds of examples but no docs.
>
> --
> --> So are we going to celebrate the start of a new decade at the end of this year? Or do the tens start at in January 2011? <--
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Wow, don't even know where to begin.  We're all happy to help but this
question is nonsensical, can you be any more specific?  This miiight
be what you're looking for:
http://httpd.apache.org/docs/2.0/mod/mod_dir.html

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] GET request on a directory

Posted by Mark Watts <m....@eris.qinetiq.com>.
On Fri, 2009-10-23 at 13:30 -0600, Doug McNutt wrote:
> GET requests which would otherwise look for an index.html file but are set up with something like this:
> 
> HTTP://domain.com/somedirectory/?C=xx;O=yy
> 
> seem to reply with a formatted list of directory contents.  Can someone point me to some documentation for that?  Googling for "?C=M;O=a" gets hundreds of examples but no docs.
> 

This is mod_autoindex

http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#query


-- 
Mark Watts BSc RHCE MBCS
Senior Systems Engineer, Managed Services Manpower
www.QinetiQ.com
QinetiQ - Delivering customer-focused solutions
GPG Key: http://www.linux-corner.info/mwatts.gpg