I have this rule:
RewriteRule ^(panel|admin|site)/([A-Za-z0-9]+?)/(scripts|assets)/(.*)$ Project/$2/Public/$3/$1/$4 [L]
The idea is to allow access to public assets as they exist inside modules of code. The only issue is that the naming scheme requires title case (lets assume this is unchangeable). Hence, a request to:
/site/users/scripts/myscript.js
returns 404, but:
/site/Users/scripts/myscript.js
works.
I have attempted to use mod_speling to deal with the casing issue, however mod_speling does a full redirect rather than an internal one, hence the url to the end user changes to:
/Project/Users/Public/scripts/myscript.js
Which is no good. It means that my directory structure is somewhat exposed and it means i need an extra rewrite rule to pass this through.
Is there any way of handling the capitalisation in mod_rewrite more gracefully, ie without using RewriteMap? (Need to keep everything in the .htaccess)
Alternatively, is there a way of changing mod_speling to use an internal redirect?