httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] Using ForceType on wildcards, directories
Date Sun, 04 Sep 2005 17:27:02 GMT
On 9/3/05, Dan Trainor <info@hostinthebox.net> wrote:
> Hello, all -
> 
> I've been doing some investigation on using ForceType in conjunction
> with some wildcard characters.  Something such as "inside all
> directories prefixed by mystring-*, I want to ForceType this/type".
> 
> Aside from needing to learn a bit more about regex's, I think I have it
> pretty much figured out.
> 
> However, I don't know if I should use Location or LocationMatch for
> this.  It looks like both do support extended regular expressions, but
> I'm confused as to which to use.

First, you should probably use <Directory> or <DirectoryMatch> if you
are matching directories in the filesystem.  Second, the "Match"
sections use Perl-compatible regular expressions (in 2.0), while the
non-Match sections use fnmatch style wildcards, not regular
expressions.  This is all documented here:
http://httpd.apache.org/docs/2.0/sections.html#file-and-web
Which one you want to use depends on the complexity of your pattern.

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