<IfModule mod_rewrite.c>
Options -MultiViews -Indexes
RewriteEngine On
# Set base path when installed in a sub folder i.e. /store
RewriteBase /
# Don't rewrite if file exists
RewriteCond %{REQUEST_FILENAME} !-f [OR]
# Restrict access to template assets and cached images
RewriteCond %{REQUEST_URI} !/templates/[^/]+/(assets)/.*
RewriteCond %{REQUEST_URI} !/core/cache/image.*
# Rewrite everything else to index
RewriteRule ^(.*)$ index.php [L]
</IfModule>