You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matus UHLAR - fantomas <uh...@fantomas.sk> on 2010/06/11 08:40:23 UTC

Re: [users@httpd] Trying to use one index file for all files in a directory

On 10.06.10 11:46, Jeffrey Schmitz wrote:
> That said, I have searched for a way to use the index.php file that I have
> created to be the default for all folders nested in a top level "Documents"
> folder.

<Directory /.../Documents>
DirectoryIndex /.../index.php
</Directory>

> It basicly searches whatever directory it is being called from to
> find any images/pdfs contained and produce a gallery based on them. I could
> copy this index.php to each of the nested folders but it seems to me there
> must be a more efficient way to do this in Apache. I found that a .htaccess
> file can be placed in a top level directory to call directives on all sub
> folders, but I can't figure out a directive that would achieve this goal.

you can put the DirectoryIndex (providing full path) in .htaccess, you don't
need <Directory> then. But make sure .htaccess is used and you may override
the DirectoryIndex (see AllowOverride in apache's config).
Not using .htaccess is a bit more effective.
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Posli tento mail 100 svojim znamim - nech vidia aky si idiot
Send this email to 100 your friends - let them see what an idiot you are

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