httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] Directory and Files setting
Date Thu, 17 Apr 2003 16:50:09 GMT

On Fri, 18 Apr 2003, Batara Kesuma wrote:
> How can I set <Files> to point to only 1 file? I mean, I want to set
> mod_perl only on /index.html. If I set it like:
>
> <Directory "/var/www/html">
> <Files index.html>
>   ...
> </Files>
> </Directory>
>
> Then /var/www/html/sub_domain/index.html will become mod_perl too. How can
> I do this?

Two choices:

1. Depending on the directive, you can often "remove" it for the
subdirectories:

<Directory "/var/www/html">
 <Files index.html>
   AddHandler foo .bar
 </Files>
</Directory>
<Directory /var/www/html/*>
 <Files index.html>
   RemoveHandler .bar
 </Files
</Directory>

2. Use Location:
<Location /index.html>
SetHandler foo
</Location>

But be careful with this one, since url-locations and directory/filenames
don't necessarily map one-to-one.

Joshua.

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


Mime
View raw message