Hey,
I have a problem with the regular expression at the bottom. I'm trying to pass all patterns except index.php, robots.txt and any css and js file through the index file, however I have one specific path where I need to process js and css files through php. Normally my url structure is like this:
example.com/class/function
lets say I want to process css and js files from the below pattern:
example.com/view/file/xxxxx.js/css
normally I would have thought this code would work but it doesn't:
(.*)(?!view\/file)(.*)\.(js|css)
for some odd reasons this code work (removed 'view' and added \/ before (.*)):
(\w*)(?!\/file\/)\/(.*)\.(js|css)
but then I won't be able to load files from the main directory:
example.com/file.js
And when I modify the file like this, it doesn't work again... (all I did was to make \/ optional):
(\w*)(?!\/file\/)(\/?)(.*)\.(js|css)
Here is the original htaccess file:
RewriteCond $1 !^(index\.php|robots\.txt|(.*)\.(js|css))
RewriteRule ^(.*)$ /index.php/$1 [L]