Here is what I need to do:
In my CodeIgniter application, I have a folder named “modules”, and each module contains (among others) a folder named assets, which contains all the resources that need to be available from the browser.
The file structure is in this format:
modules
MyModule
assets
views
etc...
The MyModule folder is dynamic, so I need to add a rule that does not rewrite the paths like
/modules/ANY MATCH/assets
but I can’t figure out the proper Regular Expression…
My current pattern is the following:
^(index\.php|robots\.txt|libs|themes|app/modules/^.$/assets|sitemap.xml)
but the ^.$ obviously doesn’t work… I’m a complete RegEx noob :/
Any help would be appreciated. Thanks for your time!
I think you want
or better, if
ANY MATCHis always a single folder only: