beheh/clonklorry/master/web/.htaccess - Htaccess File

beheh/clonklorry/master/web/.htaccess

AddDefaultCharset utf-8

<IfModule mod_deflate.c>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/html
        AddOutputFilterByType DEFLATE text/plain
        AddOutputFilterByType DEFLATE text/css
        AddOutputFilterByType DEFLATE text/javascript
        AddOutputFilterByType DEFLATE application/x-javascript
        AddOutputFilterByType DEFLATE application/javascript
        AddOutputFilterByType DEFLATE image/x-icon
        AddOutputFilterByType DEFLATE application/json
    </IfModule>
</IfModule>

DirectoryIndex index.php

<IfModule mod_rewrite.c>
  RewriteEngine on

  # detect rewrite base
  RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::2$
  RewriteRule ^(.*) - [E=BASE:%1]

  # prevent duplicate content
  RewriteCond %{ENV:REDIRECT_STATUS} ^$
  RewriteRule ^index.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]

  # serve existing files
  RewriteCond %{REQUEST_FILENAME} -f
  RewriteRule .? - [L]

  # rewrite all other queries to the front controller.
  RewriteRule .? %{ENV:BASE}/index.php [L]
</IfModule>

<IfModule !mod_rewrite.c>
  <IfModule mod_alias.c>
    RedirectMatch 301 ^/$ /index.php/
  </IfModule>
</IfModule>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, ENV, REDIRECT_STATUS, REQUEST_FILENAME, REQUEST_URI

Comments

Apache