HyuchiaDiego/AegisTemplate/master/src/.htaccess - Htaccess File

HyuchiaDiego/AegisTemplate/master/src/.htaccess

# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------

# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8

# Force UTF-8 for a number of file formats
AddCharset utf-8 .atom .css .js .json .rss .vtt .xml

# ----------------------------------------------------------------------
# Some Security
# ----------------------------------------------------------------------

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
SetEnvIfNoCase User-Agent "^libwww-perl*" block_bad_bots
Deny from env=block_bad_bots

<Limit GET POST>
  order deny,allow
  deny from all
  allow from all
</Limit>

<Limit PUT DELETE>
  order deny,allow
  deny from all
</Limit>

# Prevent Folder's browsing
<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>

# Block access to "hidden" directories or files
<IfModule mod_rewrite.c>
    RewriteCond %{SCRIPT_FILENAME} -d [OR]
    RewriteCond %{SCRIPT_FILENAME} -f
    RewriteRule "(^|/)." - [F]
</IfModule>

# Block access to backup and source files.
<FilesMatch "(.(bak|config|dist|fla|inc|ini|log|psd|sh|sql|swp)|~)$">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>

# Increase cookie security
<IfModule mod_php5.c>
    php_value session.cookie_httponly true
</IfModule>

# Prevent Iframe
Header set X-Frame-Options DENY

# Disable server signature
ServerSignature Off

# ----------------------------------------------------------------------
# Make the index handle all Request's
# ----------------------------------------------------------------------

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteCond %{REQUEST_URI} ^system.*
  RewriteRule ^(.*)$ /index.php?/$1 [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

# ----------------------------------------------------------------------
# Error Documents
# ----------------------------------------------------------------------
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 404 /error/404.html
ErrorDocument 403 /error/403.html
ErrorDocument 500 /error/500.html

# ----------------------------------------------------------------------
# Enable Gzip
# ----------------------------------------------------------------------
<ifModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
  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.*
</ifModule>

On Github License

Files

Download PDF of Htaccess file
GET, POST, PUT, REQUEST_FILENAME, REQUEST_URI, SCRIPT_FILENAME

Comments

Apache