I am trying to behave such as the following during my .htaccess file:

Alias /assets /location/of/files

RewriteCond %{REQUEST_URI} ^/assets/[0-9]+.jpg$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* /build_thumbnail.cfm?path=%{REQUEST_URI} [QSA,L]

So theoretically the correct answer is straightforward:

  • a picture is asked for from the url beginning with /assets/
  • apache inspections for the presence of the file
  • if found, the file is offered
  • otherwise, a script operates rather

This really is working fine elsewhere but this is actually the very first time I have attempted for doing things on the directory incorporated being an Alias. When I comprehend it Mod Rewrite runs before Mod Alias which may surely cause this to not work (and in reality my Alias line is incorporated in the apache conf as the relaxation is within .htaccess).

It is possible to method of getting Mod Rewrite to acknowledge the Aliased directory?

Can you really alter the Alias line to some Rewrite line rather?

Try [cde] rather to invoke a subrequest: