persony/ - Htaccess File


Options +FollowSymLinks
AddDefaultCharset UTF-8
IndexIgnore */*

ServerSignature Off
#php_flag expose_php Off

RewriteEngine On

RewriteBase /

# Universal redirect from www to without wwww
# RewriteCond %{HTTPS} !=on
# RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
# RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

#RewriteCond %{REQUEST_FILENAME} -f [OR]
#RewriteCond %{REQUEST_FILENAME} -l [OR]
#RewriteCond %{REQUEST_FILENAME} -d

#RewriteRule ^.*$ - [NC,L]
#RewriteRule ^.*$ index.php [NC,L]

<IfModule mod_deflate.c>
    # compress text, html, javascript, css, xml:
    AddEncoding gzip .gz

    # favicon.ico
    AddOutputFilterByType DEFLATE image/x-icon
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE text/css

    # problems browser
    BrowserMatch "MSIE [456]" no_gzip dont-vary
    BrowserMatch "SV1;" !no_gzip !dont-vary
    BrowserMatch "Opera" !no_gzip !dont-vary
    BrowserMatch "Firefox/[0-3]." gzip-only-text/html
    BrowserMatch "Firefox/3.[1-9]" !gzip-only-text/html
    BrowserMatch "Chrome/2" gzip-only-text/html
    BrowserMatch "Safari" gzip-only-text/html
    BrowserMatch "Konqueror" gzip-only-text/html

<IfModule mod_headers.c>
    ExpiresActive On
    ExpiresByType image/gif "access plus 6 months"
    ExpiresByType image/jpeg "access plus 6 months"
    ExpiresByType image/png "access plus 6 months"
    ExpiresByType text/css "access plus 6 months"
    ExpiresByType text/javascript "access plus 6 months"
    ExpiresByType application/javascript "access plus 6 months"

    # proxy useragent
    Header append Vary User-Agent env=!dont-vary

    # disallow proxy cashe for compressed files
    <FilesMatch .*.(css|js|php|phtml|shtml|html|xml)$>
        Header append Cache-Control: "private, must-revalidate"

<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_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

On Github License


Download PDF of Htaccess file