lesha724/votes/master/.htaccess - Htaccess File

lesha724/votes/master/.htaccess

AddDefaultCharset UTF-8

php_value date.timezone 'Europe/Kiev'

<IfModule mod_rewrite.c>
    RewriteEngine on

    # Use gzipped static files if they exist
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{HTTP_USER_AGENT} !Konqueror
    RewriteCond %{REQUEST_FILENAME}.gz -f
    RewriteRule ^(.*).(css|js)$ $1.$2.gz [QSA,L]
    <FilesMatch .css.gz$>
        ForceType text/css
    </FilesMatch>
    <FilesMatch .js.gz$>
        ForceType text/javascript
    </FilesMatch>
    <IfModule mod_mime.c>
        AddEncoding gzip .gz
    </IfModule>

    # if a directory or a file exists, use it directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # otherwise forward it to index.php
    RewriteRule . index.php [L]

  # Block out any script trying to base64_encode data within the URL.
  RewriteCond %{QUERY_STRING} base64_encode[^(]*([^)]*) [OR]
  # Block out any script that includes a <script> tag in URL.
  RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
  RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
  # Block out any script trying to set a PHP GLOBALS variable via URL.
  RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
  # Block out any script trying to modify a _REQUEST variable via URL.
  RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
  RewriteRule ^(.*)$ index.php [F,L]
  
    # Forward dangerous paths to index.php
    RewriteCond %{REQUEST_FILENAME} (.*/)?.svn/ [OR]
    RewriteCond %{REQUEST_FILENAME} .git/ [OR]
    RewriteCond %{REQUEST_FILENAME} .gitignore$ [OR]
    RewriteCond %{REQUEST_FILENAME} protected/ [OR]
    RewriteCond %{REQUEST_FILENAME} framework/
    RewriteRule . index.php [L]
</IfModule>
<files .htaccess>
order allow,deny
deny from all
</files>

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

On Github License

Files

Download PDF of Htaccess file
HTTP_USER_AGENT, QUERY_STRING, REQUEST_FILENAME, static

Comments

Apache