#PHP conf changes php_value post_max_size 50M php_value upload_max_filesize 50M php_value max_input_vars 3000 RewriteEngine On Options +FollowSymlinks #RewriteOptions MaxRedirects=5 RewriteBase / #### CACHÉ #### # 1 Setmana Header unset Set-Cookie Header set Cache-Control "public, max-age=604800" # 1 Setmana Header unset Set-Cookie Header set Cache-Control "public, max-age=604800" # No caché Header set Cache-Control "private, no-store, no-cache, must-revalidate, max-age=0" #### COMPRESSIÓ #### SetOutputFilter DEFLATE # Els següents tipus NO seràn comprimits SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|rar|zip|pdf|woff)$ no-gzip dont-vary # Forçem a que el proxy cachegi tant la versió comprimida com la no-comprimida per si els clients no tenen activada la compressió Header append Vary Accept-Encoding #Bloquear tarfico Microsoft Share Point RewriteRule ^/?FPURL\.xml$ - [F,L] #Bloquear peticiones wp-login y similares RewriteCond %{REQUEST_URI} ^/wp-login\.php(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/wp- [NC] RewriteRule ^(.*)$ . [R=403,L] #Rewrite añadir ssl RewriteCond %{HTTPS} =off [NC] RewriteCond %{HTTP_HOST} ^(www\.)?hotelcortezo\.com RewriteRule ^(.*)$ https://www.hotelcortezo.com/$1 [R=301,L] # rewrite per afegir les www RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] #Solo Motor - Cross Domain de les Icones Header set Access-Control-Allow-Origin "*" RewriteCond %{REQUEST_URI} !\.(jpg|otf|gif|jpeg|png|js|css|txt|pdf|zip|bz2|gz|php|ico|ipx|swf|flv|woff) [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ index.php