rbri/escher-cms/master/.htaccess - Htaccess File

rbri/escher-cms/master/.htaccess

DirectoryIndex index.php
Options -Indexes +FollowSymLinks
AddDefaultCharset UTF-8
AcceptPathInfo On
ErrorDocument 403 /index.php

<IfModule mod_php5.c>
   php_flag register_globals off
   php_flag magic_quotes_gpc off
   php_flag short_open_tag on
</IfModule>

<IfModule mod_rewrite.c>
   RewriteEngine On
#   RewriteBase /escher

################################################################################
#
#   Uncomment this block of rules for static file caching.
#
#
#   Replace all occurrences of "my.fqdn.com" with the fully qualified domain
#   name of your production site.
#
#
#   RewriteCond %{SERVER_NAME} ^my.fqdn.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages%{REQUEST_URI} -f
#   RewriteRule ^(.*)$ /cache/pages/$1 [L]
#
#   RewriteCond %{SERVER_NAME} ^my.fqdn.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages%{REQUEST_URI}.html -f
#   RewriteRule ^(.*)$ /cache/pages/$1.html [L]
#
#   RewriteCond %{SERVER_NAME} ^my.fqdn.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages%{REQUEST_URI} -d
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages%{REQUEST_URI}index.html -f
#   RewriteRule ^(.*)$ /cache/pages/$1index.html [L]
#
#
#   Replace all occurrences of "staging.my.fqdn.com" with the fully qualified
#   domain name of your staging site.
#
#
#   RewriteCond %{SERVER_NAME} ^staging.my.fqdn.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.staging%{REQUEST_URI} -f
#   RewriteRule ^(.*)$ /cache/pages.staging/$1 [L]
#
#   RewriteCond %{SERVER_NAME} ^staging.my.fqdn.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.staging%{REQUEST_URI}.html -f
#   RewriteRule ^(.*)$ /cache/pages.staging/$1.html [L]
#
#   RewriteCond %{SERVER_NAME} ^staging.my.fqdn.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.staging%{REQUEST_URI} -d
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.staging%{REQUEST_URI}index.html -f
#   RewriteRule ^(.*)$ /cache/pages.staging/$1index.html [L]
#
#
#   Replace all occurrences of "dev.my.fqdn.com" with the fully qualified
#   domain name of your development site.
#
#
#   RewriteCond %{SERVER_NAME} ^dev.my.fqdn.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.dev%{REQUEST_URI} -f
#   RewriteRule ^(.*)$ /cache/pages.dev/$1 [L]
#
#   RewriteCond %{SERVER_NAME} ^dev.my.fqdn.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.dev%{REQUEST_URI}.html -f
#   RewriteRule ^(.*)$ /cache/pages.dev/$1.html [L]
#
#   RewriteCond %{SERVER_NAME} ^dev.my.fqdn.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.dev%{REQUEST_URI} -d
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.dev%{REQUEST_URI}index.html -f
#   RewriteRule ^(.*)$ /cache/pages.dev/$1index.html [L]
#
################################################################################

   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteCond %{REQUEST_URI} !^/favicon.ico
   RewriteRule ^(.*) index.php [L]
</IfModule>

################################################################################
#
#   If using static file caching, enable browser-side caching by uncommenting.
#
#FileETag none
#
#<IfModule mod_headers.c>
#   Header unset ETag
#
#   <Files *.html>
#      Header append Cache-Control "max-age=0, no-cache, must-revalidate"
#   </Files>
#</IfModule>
#
#<IfModule mod_expires.c>
#   ExpiresActive On
#   ExpiresByType image/* "access plus 7 day"
#   ExpiresByType text/css "access plus 7 day"
#   ExpiresByType application/x-javascript "access plus 7 day"
#</IfModule>
#
################################################################################

On Github License

Files

Download PDF of Htaccess file
DOCUMENT_ROOT, GET, no-cache, REQUEST_FILENAME, REQUEST_METHOD, REQUEST_URI, SERVER_NAME, static

Comments

Apache