Options -MultiViews
RewriteEngine on
RewriteBase /
# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]
###
# Removes access to the system folder by users.
# Additionally this will allow you to create a System.php controller,
# previously this would not have been possible.
# 'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
# Removes index.php of the URI string
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) index.php/$1 [L]
# Afegeix al header una data de expiracio per aquests arxius al browser del client de 1 mes
# ExpiresActive On
# ExpiresByType image/gif A432000
# ExpiresByType image/png A432000
# ExpiresByType image/jpg A432000
# ExpiresByType image/jpeg A432000
# ExpiresByType text/css A432000
#Create filter to match files you want to cache... 5 dies
# <Files *.js>
# Header add "Cache-Control" "max-age=432000"
# </Files>
# <Files *.mp3>
# Header add "Cache-Control" "max-age=432000"
# </Files>