GET request on a directory

GET request on a directory

am 23.10.2009 21:30:10 von Doug McNutt

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 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: GET request on a directory

am 23.10.2009 21:45:44 von Jonathan Zuckerman

On Fri, Oct 23, 2009 at 12:30 PM, Doug McNutt wr=
ote:
> GET requests which would otherwise look for an index.html file but are se=
t up with something like this:
>
> HTTP://domain.com/somedirectory/?C=3Dxx;O=3Dyy
>
> seem to reply with a formatted list of directory contents.  Can some=
one point me to some documentation for that?  Googling for "?C=3DM;O=
=3Da" 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 for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.or=
g
> 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 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: GET request on a directory

am 23.10.2009 22:26:36 von Doug McNutt

At 12:45 -0700 10/23/09, Jonathan Zuckerman wrote:
>On Fri, Oct 23, 2009 at 12:30 PM, 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.
>>
>
>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 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: GET request on a directory

am 23.10.2009 23:04:39 von Eric Covener

If the files listed in DirectoryIndex aren't found
(http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directory index),
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 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: GET request on a directory

am 23.10.2009 23:15:14 von aw

Eric Covener wrote:
> If the files listed in DirectoryIndex aren't found
> (http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directory index),
> 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 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: GET request on a directory

am 24.10.2009 16:51:54 von Doug McNutt

>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

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 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: GET request on a directory

am 24.10.2009 19:28:04 von Jonathan Zuckerman

On Saturday, October 24, 2009, Doug McNutt 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=3Dxx;O=3Dyy
>>>
>>> seem to reply with a formatted list of directory contents.  Can so=
meone point me to some documentation for that?  Googling for "?C=3DM;O=
=3DA" 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 th=
is
>>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
>
> has this to say:
>
>    * C=3DN sorts the directory by file name
>    * C=3DM sorts the directory by last-modified date, then fil=
e name
>    * C=3DS sorts the directory by size, then file name
>    * C=3DD sorts the directory by description, then file name
>    * O=3DA sorts the listing in Ascending Order
>    * O=3DD sorts the listing in Descending Order
>    * F=3D0 formats the listing as a simple list (not FancyInde=
xed)
>    * F=3D1 formats the listing as a FancyIndexed list
>    * F=3D2 formats the listing as an HTMLTable FancyIndexed li=
st
>    * V=3D0 disables version sorting
>    * V=3D1 enables version sorting
>    * P=3Dpattern lists only files matching the given pattern
>
> The summary seems to say that one can have mod_dir OR mod_autoindex but n=
ot 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 a=
nd 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 an=
d apache, as installed by pair.com, does deliver a list of files that a vis=
itor can click on. Is it  _dir or  _autoindex is the question I s=
hall ask.
>
> Thanks for the helping hand.
>
> --
> --> If  it's not  on  fire  it's  a  softwa=
re  problem. <--
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.o=
rg
> 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 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: GET request on a directory

am 26.10.2009 09:53:48 von Mark Watts

--=-4h+Jw9ezSVnLWMDEtgwD
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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 se=
t up with something like this:
>=20
> HTTP://domain.com/somedirectory/?C=3Dxx;O=3Dyy
>=20
> seem to reply with a formatted list of directory contents. Can someone p=
oint me to some documentation for that? Googling for "?C=3DM;O=3Da" gets h=
undreds of examples but no docs.
>=20

This is mod_autoindex

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


--=20
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

--=-4h+Jw9ezSVnLWMDEtgwD
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkrlY5wACgkQBn4EFUVUIO3qlwCfX3o0V9Ra9kf6QeIfMgC0 DWYk
hH8An0jIY3mBFe0Eoi4zxZCdGYn3J0iC
=k6P5
-----END PGP SIGNATURE-----

--=-4h+Jw9ezSVnLWMDEtgwD--