Header add X-XSS-Protection "1"
Header add X-Content-Type-Options "nosniff"

RewriteEngine On

RewriteCond %{HTTP_HOST} .*:(3000|8080)$ [OR]
RewriteCond %{HTTP_HOST} .*\.atbs\.it$
RewriteRule ^ - [E=dev:1]

RewriteCond %{ENV:dev} 1
RewriteRule ^content/uploaded/(.*?)$ https://www.ticketsmarter.com/content/uploaded/$1 [R,L]

RewriteCond %{ENV:dev} !=1
RewriteCond %{HTTP_HOST} ^ticketsmarter\.com [NC]
RewriteRule (.*) https://www.ticketsmarter.com/$1 [R=301,L]

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
</IfModule>

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php

