Now I am using this code in my .htaccess
RewriteRule /images(.*) /images/$1
RewriteRule /css(.*) /css/$1
RewriteRule /js(.*) /js/$1
But there is a problem when I have added some third party plugins which uses this same folders but not on root folder, but on their subfolders, so I now need to change this so that it will only apply for folder /images/ and not for example /plugins/myplugin/templates/images/
Try incorporating the
^regex symbol denoting the beginning of the string:Now these will only match URL’s like:
but not when they are in a subfolder.