alexballera/portafolio/master/src/.htaccess - Htaccess File


<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 image/svg "access 1 year"
ExpiresByType image/svg+xml "access 1 year"
ExpiresByType image/woff "access 1 year"
ExpiresByType image/webp "access 1 year"
ExpiresByType font/opentype "access 1 year"
ExpiresByType font/otf "access 1 year"
ExpiresByType font/ttf "access 1 year"
ExpiresByType font/woff "access 1 year"
ExpiresByType font/svg "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/stylesheet "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType text/javascript "access 1 month"
ExpiresByType text/script "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"

#Headers Cache-Control
<IfModule mod_headers.c>
  Header unset ETag
  FileETag None
  <FilesMatch ".(css|jpg|jpeg|png|gif|js|ico|swf|html)$">
      Header set Cache-Control "max-age=2592000, public"
  <FilesMatch ".(x?html?|php)$">
      Header set Cache-Control "max-age=600, private, must-revalidate"

## Error 404 ##
ErrorDocument 404

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_include mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

<ifmodule mod_deflate.c>
SetOutputFilter DEFLATE
  # Compress HTML, CSS, JavaScript, Text, XML and fonts
  AddOutputFilterByType DEFLATE application/javascript application/rss+xml application/ application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/x-httpd-php application/xml font/opentype font/otf font/ttf font/woff font/svg image/svg image/jpg image/jpeg image/gif image/png image/webp image/svg+xml image/x-icon text/stylesheet text/css text/html text/javascript text/script text/plain text/text text/xml

  # Remove browser bugs (only needed for really old browsers)
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4.0[678] no-gzip
  BrowserMatch bMSIE !no-gzip !gzip-only-text/html
  BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html
  SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip
  Header append Vary User-Agent env=!dont-vary

On Github License


Download PDF of Htaccess file