amertak/Fractions/master/Application/www/.htaccess - Htaccess File

amertak/Fractions/master/Application/www/.htaccess

# Apache configuration file (see httpd.apache.org/docs/current/mod/quickreference.html)

# disable directory listing
<IfModule mod_autoindex.c>
  Options -Indexes
</IfModule>

# enable cool URL
<IfModule mod_rewrite.c>
  RewriteEngine On
  # RewriteBase /
  
  RewriteCond %{HTTP_HOST} ^zlomkyhrave.cz$ [OR]
  RewriteCond %{HTTP_HOST} ^www.zlomkyhrave.cz$ [OR]
  RewriteCond %{HTTP_HOST} ^www.zlomky-hrave.cz$
  RewriteRule ^(.*)$ http://zlomky-hrave.cz/$1 [R=301,L]
  
  RewriteCond %{SERVER_PORT} 80
  RewriteRule ^(.*)$ https://zlomky-hrave.cz/$1 [R,L]

  # prevents files starting with dot to be viewed by browser
  RewriteRule /.|^. - [F]

  # front controller
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule !.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar.gz|map)$ index.php [L]
</IfModule>

Header set Strict-Transport-Security "max-age=31536000" env=HTTPS

# enable gzip compression
<IfModule mod_deflate.c>
  <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json application/xml image/svg+xml
  </IfModule>
</IfModule>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_HOST, HTTPS, REQUEST_FILENAME, SERVER_PORT

Comments

Apache