You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matt Silva <mp...@storagecommander.com> on 2002/12/30 11:45:36 UTC
[users@httpd] Wild Cards in the filenames in a DirectoryIndex list ???
Hello everyone, and Happy Holidays
How can I use wild cards in the filenames in a DirectoryIndex list?
I have structured my website using sections (e.g /sections/family ,
/sections/projects, /sections/whatever). So for each section directory
I would like to have an index.section.php file. I have tried using * and % as
wild cards like this:
DirectoryIndex index.php index.*.php index.html
-or-
DirectoryIndex index.php index.%.php index.html
If I use the first I get an Error 403 and if I use the second I get an Error 400.
Can this even be done with wild cards or do I have to use regular expressions?
I know I can do this by brute force e.g. follow symbolic links i.e. have an index.html
symbolic link in each directory that points to its corresponding section (index.html --> index.projects.php)
or have php do a redirect (that would be really brutal) or mod rewrite and possibly a couple
of more solutions.
Any answers would greatly appreciated. Cheers
Matt
Matt Silva
---------------------------------------------------------------------------------------------------------------------
Empower Software Technologies
matt@storagecommander.com
PH 909.672.6257
FX 909.672.6258
---------------------------------------------------------------------
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] Wild Cards in the filenames in a DirectoryIndex
list ???
Posted by Rich Bowen <rb...@rcbowen.com>.
On Mon, 30 Dec 2002, Matt Silva wrote:
> Hello everyone, and Happy Holidays
>
> How can I use wild cards in the filenames in a DirectoryIndex list?
DirectoryIndex does not accept wildcard arguments. Your best bet is to
look into content negotiation as a possible solution.
--
Nothing is perfekt. Certainly not me.
Success to failure. Just a matter of degrees.
---------------------------------------------------------------------
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