I have a web site that's using php on apache to dynamically display folder
contents... That is, I've created a script that is displayed if there isn't
a default document in the folder itself. My default documents in Apache are
in this order:

index.htm
index.html
index.php
/_Script/_index.php

The last one is a problem in IIS...

So, for example, if I browse a folder that contains images and has no
index/default page, the _index.php script I've created displays the list of
images as well as thumbnails that it dynamically creates. Directory browsing
is disabled because I have my own implementation of it in the _index.php
script that has many more features than the built-in directory listing.

If you'd like to see what I'm talking about, take a look at
http://www.jmiassociates.com/Public/Images/Stock/
The folder contains only web-size .jpg images, and sub-folders that contain
thumbnails and the original full-size images.


The problem is this: I'm upgrading our file server to Windows Server 2003,
and I'd like to migrate the site to IIS to make administration of
users/groups easier. I've configured IIS with php which works just fine,
but the problem I have is that the IIS doesn't seem to allow paths from
being entered in the default document list. I also tried moving the script
to the root of the site, but the leading forward slash is ignored.

Does anyone know of a way to set a path to a default document? Is there
another way to replace the built-in directory listing without re-inventing
the wheel?

- Aaron Lance

Converting site from Apache/PHP to IIS/PHP - default document problem by Dan

Dan
Wed Jul 30 12:05:09 CDT 2003

Aaron,

My first blush is to answer, IIS 6.o does not support
pathing in a default document list.

I am checking some other resources and will confirm this.

Dan
>-----Original Message-----
>
>I have a web site that's using php on apache to
dynamically display folder
>contents... That is, I've created a script that is
displayed if there isn't
>a default document in the folder itself. My default
documents in Apache are
>in this order:
>
>index.htm
>index.html
>index.php
>/_Script/_index.php
>
>The last one is a problem in IIS...
>
>So, for example, if I browse a folder that contains
images and has no
>index/default page, the _index.php script I've created
displays the list of
>images as well as thumbnails that it dynamically creates.
Directory browsing
>is disabled because I have my own implementation of it in
the _index.php
>script that has many more features than the built-in
directory listing.
>
>If you'd like to see what I'm talking about, take a look
at
>http://www.jmiassociates.com/Public/Images/Stock/
>The folder contains only web-size .jpg images, and sub-
folders that contain
>thumbnails and the original full-size images.
>
>
>The problem is this: I'm upgrading our file server to
Windows Server 2003,
>and I'd like to migrate the site to IIS to make
administration of
>users/groups easier. I've configured IIS with php which
works just fine,
>but the problem I have is that the IIS doesn't seem to
allow paths from
>being entered in the default document list. I also tried
moving the script
>to the root of the site, but the leading forward slash is
ignored.
>
>Does anyone know of a way to set a path to a default
document? Is there
>another way to replace the built-in directory listing
without re-inventing
>the wheel?
>
> - Aaron Lance
>
>
>.
>

Re: Converting site from Apache/PHP to IIS/PHP - default document problem by Tom

Tom
Wed Jul 30 12:13:42 CDT 2003

"Aaron Lance" <alance@jmiassociates.com> wrote in message
news:eFlaEirVDHA.2024@TK2MSFTNGP12.phx.gbl...
>
> I have a web site that's using php on apache to dynamically display folder
> contents... That is, I've created a script that is displayed if there
isn't
> a default document in the folder itself. My default documents in Apache
are
> in this order:
>
> index.htm
> index.html
> index.php
> /_Script/_index.php
>
> The last one is a problem in IIS...
>
> So, for example, if I browse a folder that contains images and has no
> index/default page, the _index.php script I've created displays the list
of
> images as well as thumbnails that it dynamically creates. Directory
browsing
> is disabled because I have my own implementation of it in the _index.php
> script that has many more features than the built-in directory listing.
>
> If you'd like to see what I'm talking about, take a look at
> http://www.jmiassociates.com/Public/Images/Stock/
> The folder contains only web-size .jpg images, and sub-folders that
contain
> thumbnails and the original full-size images.
>
>
> The problem is this: I'm upgrading our file server to Windows Server 2003,
> and I'd like to migrate the site to IIS to make administration of
> users/groups easier. I've configured IIS with php which works just fine,
> but the problem I have is that the IIS doesn't seem to allow paths from
> being entered in the default document list. I also tried moving the
script
> to the root of the site, but the leading forward slash is ignored.
>
> Does anyone know of a way to set a path to a default document? Is there
> another way to replace the built-in directory listing without re-inventing
> the wheel?

Create a custom error script for the 403;14 error code pointing to the URL
"/_Script/_index.php". I tested with an ASP instead of PHP and it works.

--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/




Re: Converting site from Apache/PHP to IIS/PHP - default document problem by Aaron

Aaron
Wed Jul 30 12:48:25 CDT 2003

"Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
news:bg8ua1$kd58@kcweb01.netnews.att.com...
> "Aaron Lance" <alance@jmiassociates.com> wrote in message
> news:eFlaEirVDHA.2024@TK2MSFTNGP12.phx.gbl...
> >
> > I have a web site that's using php on apache to dynamically display
folder
> > contents... That is, I've created a script that is displayed if there
> isn't
> > a default document in the folder itself. My default documents in Apache
> are
> > in this order:
> >
> > index.htm
> > index.html
> > index.php
> > /_Script/_index.php
> >
> > The last one is a problem in IIS...
> >
> > So, for example, if I browse a folder that contains images and has no
> > index/default page, the _index.php script I've created displays the list
> of
> > images as well as thumbnails that it dynamically creates. Directory
> browsing
> > is disabled because I have my own implementation of it in the _index.php
> > script that has many more features than the built-in directory listing.
> >
> > If you'd like to see what I'm talking about, take a look at
> > http://www.jmiassociates.com/Public/Images/Stock/
> > The folder contains only web-size .jpg images, and sub-folders that
> contain
> > thumbnails and the original full-size images.
> >
> >
> > The problem is this: I'm upgrading our file server to Windows Server
2003,
> > and I'd like to migrate the site to IIS to make administration of
> > users/groups easier. I've configured IIS with php which works just
fine,
> > but the problem I have is that the IIS doesn't seem to allow paths from
> > being entered in the default document list. I also tried moving the
> script
> > to the root of the site, but the leading forward slash is ignored.
> >
> > Does anyone know of a way to set a path to a default document? Is there
> > another way to replace the built-in directory listing without
re-inventing
> > the wheel?
>
> Create a custom error script for the 403;14 error code pointing to the URL
> "/_Script/_index.php". I tested with an ASP instead of PHP and it works.
>
> --
> Tom Kaminski IIS MVP
> http://www.iistoolshed.com/ - tools, scripts, and utilities for running
IIS
> http://mvp.support.microsoft.com/
> http://www.microsoft.com/windowsserver2003/community/centers/iis/
>
>
>

That's what I was looking for. It looks like there are some security issues
I need to fix, but I think I can get it to work.

Thanks for the help,
Aaron Lance