I had explored that method already, sadly (as you know) “alias” is
given
as an absolute path meaning I can’t use this block of config within
multiple virtual hosts which I include; - would have to re-write this
same
block of config for each Virtual host modifying the alias path prefix.
And since alias man page explicitly states that $document_root can’t be
used it’s not possible to complete this config in a reusable way. (e.g.
alias $document_root/path/to/$1/$2; would be perfect).
Alas, I think what I have (storing the captures in temp vars) is the
only
real solution thus far.
I had explored that method already, sadly (as you know) “alias” is given as
an absolute path meaning I can’t use this block of config within multiple virtual
hosts which I include; - would have to re-write this same block of config for each
Virtual host modifying the alias path prefix.
And since alias man page explicitly states that $document_root can’t be used
it’s not possible to complete this config in a reusable way. (e.g. alias
$document_root/path/to/$1/$2; would be perfect).
Alas, I think what I have (storing the captures in temp vars) is the only real
solution thus far.
Unless the penny hasn’t dropped in my head?
Then you can set these variable directly in regex:
location ~ "^/[a-f0-9]{16}/(<?resource_type>css|js)/(<?resource_path>.+)
{
Although, it appears to me the correct syntax would rather be (?…), as
perlre docs state.
Then, just use you first syntax (omitting the ‘set’ directives).
You a re right, I have mistaken.
–
Igor S.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.