httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject Re: [Patch] Simplifying mod_alias
Date Thu, 22 Jan 2015 15:56:30 GMT
On 31 Dec 2014, at 5:56 PM, Eric Covener <> wrote:

> For a URL of
> # this matches against baz.html only
> <FilesMatch (.*\.html)$>
>  Redirect$1
> </FilesMatch
> You would not have any way to match or capture some part of /foo/bar/.
>  You could use the entire URL in an expression, but I think it would
> be difficult to tease it apart, and even making it just conditional
> would require something like wrapping in <if>.  I think there are some
> big gaps in string-valued expressions, even if you do try to write a
> sophisticated one (this has popped up for me in a handful of contexts
> and I have flailed around in the grammar to no avail)

This limitation affects the whole of the expression API, which covers more and more directives,
so if this is a real problem we should fix it.

Would it make sense to add a modifier to FilesMatch to indicate we want to match against the
full path instead of just the filename, for example:

<FilesMatch ~ ^/full/(path)/to/(file)$>

Alternatively, what would the impact be of allowing LocationMatch inside htaccess?


View raw message