I’ve written a very simple MVC FW, so all requests are routed to index file and the index file dispatches requests to the controllers.
I have the following .htaccess:
RewriteEngine On
RewriteBase /SlotDemo
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
And it works great but for some reason it tries to route my .js files as if they were php files (tries to route them to index.php which of course causes error).
What should I add/remove to make it treat ‘.js’ as it treats the css files?
You can easily combine both rules into one like this: