# Leverage Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/svg "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>

# Protect against Clickjacking
Header append X-Frame-Options "SAMEORIGIN"
#Header append X-Frame-Options "ALLOW-FROM platform.twitter.com"

# Error Documents
ErrorDocument 404 /404.html

# Force https and www
# CORRECT URL FROM staging to www when it goes live
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.blesta.com/$1 [R=307,L]

# Redirect /feed/ to /blog/feed.ml
RewriteRule ^feed/?$ https://www.blesta.com/blog/feed.xml [R=302,L]

# Redirect latest.zip
Redirect 301 /latest.zip https://account.blesta.com/client/plugin/download_manager/client_main/download/302/blesta-5.13.7.zip

# Redirect old pages
Redirect 301 /forums/showthread.php http://www.blesta.com/forums/
Redirect 301 /download https://account.blesta.com/client/plugin/download_manager/client_main/index/
Redirect 301 /forums/project.php http://www.blesta.com/forums/
Redirect 301 /forums/member.php http://www.blesta.com/forums/index.php?/members/
Redirect 301 /responsible-disclosure https://docs.blesta.com/support/responsible-disclosure
Redirect 301 /license http://docs.blesta.com/display/support/End+User+License+Agreement
Redirect 301 /contact https://www.blesta.com/about/
Redirect 301 /2017/03/14/blesta-4.0-released/ https://www.blesta.com/2017/03/16/blesta-4.0-released/

# Redirect pages from the old site to the new site
Redirect 301 /support http://www.blesta.com/contact/

# Redirect support and updates URL to the documentation
Redirect 302 /support-and-updates http://docs.blesta.com/display/support/Support+and+Updates

# Redirect changelog to JIRA
Redirect 302 /changelog http://dev.blesta.com/browse/CORE#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel

