agroknow/AgLR/master/.htaccess - Htaccess File


# Remember to enable display_errors on development environments only.
<IfModule mod_php5.c>
    php_value display_errors 1
    php_flag register_globals off

RewriteEngine on

# If know that mod_rewrite is enabled, but you are still getting mod_rewrite errors,
# uncomment the line below and replace "/" with your base directory.
# RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^admin/ - [C]
RewriteRule .* admin/index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php

<FilesMatch ".(php|ini)$">
 Order Allow,Deny
 Deny from all

<Files index.php>
Allow from all

# Uncomment the lines below in order to enable caching of some files via Apache (after a finished site has gone live)
#<IfModule mod_expires.c>
#  <FilesMatch ".(js|ico|gif|jpg|png|css|xml)$">
#       ExpiresActive on
#       ExpiresDefault "access plus 2 hours"
#   </FilesMatch>
<ifModule mod_deflate.c>
SetOutputFilter DEFLATE
    <FilesMatch ".(js|ico|css|html|htm|php|xml|swf)$">
    SetOutputFilter DEFLATE

<ifModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file .(html?|txt|css|js|php|pl|swf|xml)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

On Github License


Download PDF of Htaccess file