honeymustard/winterberry/master/.htaccess - Htaccess File

honeymustard/winterberry/master/.htaccess

############################################
# Settings for Winterberry
#

# don't show directory listings
Options -Indexes

# follow symbolic links in this directory
Options +FollowSymLinks

# set the default handler
DirectoryIndex index.php

# don't show .php files
<FilesMatch ".*.php$">
    Order Allow,Deny
    Deny from all
</FilesMatch>

<FilesMatch "index.php$">
    Order Allow,Deny
    Allow from all
</FilesMatch>

# redirect to index.php
ErrorDocument 400 /?sysID=1
ErrorDocument 401 /?sysID=1
ErrorDocument 402 /?sysID=1
ErrorDocument 403 /?sysID=1
ErrorDocument 404 /?sysID=1
ErrorDocument 405 /?sysID=1
ErrorDocument 406 /?sysID=1
ErrorDocument 407 /?sysID=1
ErrorDocument 408 /?sysID=1
ErrorDocument 409 /?sysID=1
ErrorDocument 410 /?sysID=1
ErrorDocument 411 /?sysID=1
ErrorDocument 412 /?sysID=1
ErrorDocument 413 /?sysID=1
ErrorDocument 414 /?sysID=1
ErrorDocument 415 /?sysID=1
ErrorDocument 416 /?sysID=1
ErrorDocument 417 /?sysID=1
ErrorDocument 422 /?sysID=1
ErrorDocument 423 /?sysID=1
ErrorDocument 424 /?sysID=1
ErrorDocument 426 /?sysID=1
ErrorDocument 500 /?sysID=1
ErrorDocument 501 /?sysID=1
ErrorDocument 502 /?sysID=1
ErrorDocument 503 /?sysID=1
ErrorDocument 504 /?sysID=1
ErrorDocument 505 /?sysID=1
ErrorDocument 506 /?sysID=1
ErrorDocument 507 /?sysID=1
ErrorDocument 510 /?sysID=1

# PHP 5, Apache 1 and 2
<IfModule mod_php5.c>

  php_flag magic_quotes_gpc                 off
  php_flag magic_quotes_sybase              off
  php_flag register_globals                 off
  php_flag session.auto_start               off
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_flag mbstring.encoding_translation    off

</IfModule>

<IfModule mod_expires.c>

  # enable expirations
  ExpiresActive On

  # cache all files for 2 weeks after access (A)
  ExpiresDefault A1209600

  # do not allow PHP scripts to be cached
  <FilesMatch .php$>

    ExpiresActive Off

  </FilesMatch>

</IfModule>

# various rewrite rules
<IfModule mod_rewrite.c>

  RewriteEngine on

  # block access to hidden dot directories
  RewriteRule "(^|/)." - [F]

  # if your site is running in a VirtualDocumentRoot
  RewriteBase /

  # pass all requests not referring directly to files to index.php
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)/?$ index.php?pageID=$1 [QSA,NC,L]

  # rules to correctly serve gzip'd .css and .js files
  <IfModule mod_headers.c>

    # serve gzip'd .css files if they exist and the client accepts gzip
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME}.gz -s
    RewriteRule ^(.*).css $1.css.gz [QSA]

    # serve gzip'd .js files if they exist and the client accepts gzip
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME}.gz -s
    RewriteRule ^(.*).js $1.js.gz [QSA]

    # serve correct content types, and prevent mod_deflate double gzip
    RewriteRule .css.gz$ - [T=text/css,E=no-gzip:1]
    RewriteRule .js.gz$ - [T=text/javascript,E=no-gzip:1]

    <FilesMatch "(.js.gz|.css.gz)$">

      Header set Content-Encoding gzip
      Header append Vary Accept-Encoding

    </FilesMatch>

  </IfModule>

</IfModule>

On Github License

Files

Download PDF of Htaccess file
no-gzip, REQUEST_FILENAME

Comments

Apache