adamaveray/blight/master/blight/src/default.htaccess - Htaccess File

adamaveray/blight/master/blight/src/default.htaccess

Options All -Indexes
AddDefaultCharset UTF-8

ErrorDocument 404 /{%WEB_PATH%}/404.html

<IfModule mod_rewrite.c>
  RewriteEngine on

  # Map indexes
  RewriteCond %{DOCUMENT_ROOT}/{%WEB_PATH%}/$1/index.html -f
  RewriteRule (.*) {%WEB_PATH%}/$1/index.html [L]

  # Map individual posts
  RewriteCond %{DOCUMENT_ROOT}/{%WEB_PATH%}/$1.html -f
  RewriteRule (.*) {%WEB_PATH%}/$1.html [L]

  # Map feeds
  RewriteCond %{DOCUMENT_ROOT}/{%WEB_PATH%}/$1.xml -f
  RewriteRule ^(.*)$ {%WEB_PATH%}/$1.xml [L]

  # Map additional files
  RewriteCond %{DOCUMENT_ROOT}/{%WEB_PATH%}/$1 -f
  RewriteRule (.*) {%WEB_PATH%}/$1 [L]

  # Handle trailing slash
  RewriteRule ^(.+)/$ /$1 [R=301,L]

  # Map theme assets
  RewriteCond %{DOCUMENT_ROOT}/{%WEB_PATH%}/assets/$1 -f
  RewriteRule (.*) {%WEB_PATH%}/assets/$1 [L]

  # Rebuild site
  RewriteRule ^$ index.php [L]
</IfModule>

<ifmodule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, DOCUMENT_ROOT

Comments

Apache