carloprato/cprato.com/master/.htaccess - Htaccess File

carloprato/cprato.com/master/.htaccess

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</IfModule>

#Options +FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

RewriteRule ^([a-zA-Z0-9_]+)$ /index.php?lang=$1 [L]
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ /index.php?lang=$1&p=$2 [L]
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ /index.php?lang=$1&p=$2&action=$3 [L]
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_-]+)$ /index.php?lang=$1&p=$2&action=$3&arg=$4 [L]
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ /index.php?lang=$1&p=$2&action=$3&arg=$4&arg2=$5 [L]
Redirect 301 /portfolio http://www.cprato.com/en/home

On Github License

Files

Download PDF of Htaccess file
DEFLATE, REQUEST_FILENAME, REQUEST_URI, SCRIPT_FILENAME

Comments

Apache