rlandas/twittersample1/master/public/.htaccess - Htaccess File

rlandas/twittersample1/master/public/.htaccess

############################################
## PHP SETTINGS
<IfModule mod_php5.c>
  php_value date.timezone "Australia/Sydney"

  # disable display of startup errors
  php_flag display_startup_errors on

  # disable display of all other errors
  php_flag display_errors on

  # disable html markup of errors
  php_flag html_errors on

  # enable logging of errors
  php_flag log_errors on

  # disable ignoring of repeat errors
  php_flag ignore_repeated_errors on

  # disable ignoring of unique source errors
  php_flag ignore_repeated_source on

  # enable logging of php memory leaks
  php_flag report_memleaks on

  # preserve most recent error via php_errormsg
  php_flag track_errors on

  # disable formatting of error reference links
  php_value docref_root 0

  # disable formatting of error reference links
  php_value docref_ext 0

  # specify path to php error log
  php_value error_log /home/path/public_html/domain/PHP_errors.log

  # specify recording of all php errors
  # [see footnote 3] # php_value error_reporting 999999999
  php_value error_reporting -1

  # disable max error string length
  php_value log_errors_max_len 0

  # protect error log by preventing public access
  <Files PHP_errors.log>
    Order allow,deny
    Deny from all
    Satisfy All
  </Files>

  php_value xdebug.var_display_max_data -1
  php_value xdebug.var_display_max_children -1
  php_value xdebug.var_display_max_depth 5

  php_value max_execution_time 60
  php_value memory_limit 1024M
  php_value file_uploads on
  php_value post_max_size 800M
  php_value upload_max_filesize 500M
  php_value short_open_tag on
  php_value mb_internal_encoding UTF-8
  php_value auto_detect_line_endings 1
  php_value max_input_vars 99999
  php_value max_input_nesting_level 5

  ## disable magic quotes for php request vars
  php_flag magic_quotes_gpc on

  ## enable resulting html compression
  php_flag zlib.output_compression off

  ############################################
  # refer to: http://www.codingforums.com/showthread.php?t=175210 for how to set the following to integer:
  # error_reporting E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING
  # echo E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING
  # php_value error_reporting 22517
  # php_value error_reporting E_ALL
</IfModule>

############################################
## PAGESPEED
<IfModule mod_pagespeed.c>
  ModPagespeed off
</IfModule>

<IfModule mod_expires.c>
  ExpiresActive off
</IfModule>

<IfModule mod_php5.c>
  # allow caching (disable=nocache/private)
  php_value session.cache_limiter nocache

  # cache pages for 180  minutes (3 hours)
  php_value session.cache_expire 0

  php_value session.use_cookies off
  php_value session.cookie_httponly off
  php_value session.cookie_lifetime 0
  php_value session.gc_maxlifetime 0
  php_value session.gc_probability 0
  php_value session.gc_divisor 100

  php_value opcache.enable off
  php_value opcache.enable_cli off
  php_value opcache.revalidate_freq 0
</IfModule>

<IfModule mod_headers.c>
  Header set Cache-Control "must-revalidate, no-store, no-cache, post-check=0, pre-check=0"
  Header set Pragma no-cache
  Header unset ETag
  Header set Vary *
</IfModule>

############################################
## BEGIN GZIP
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
  SetOutputFilter DEFLATE
</IfModule>
SetEnv no-gzip 1

RewriteEngine On
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L,E=no-gzip:1,E=dont-vary:1]
# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to
# allow proper resolution of the index.php file; it will work
# in non-aliased environments as well, providing a safe, one-size
# fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L,E=no-gzip:1,E=dont-vary:1]

On Github License

Files

Download PDF of Htaccess file
DEFLATE, ENV, no-cache, no-gzip, Pragma, REQUEST_FILENAME, REQUEST_URI

Comments

Apache