gana04/inoERP/master/.htaccess - Htaccess File

gana04/inoERP/master/.htaccess

#Make sure no can access the directories through HTTP
Options -Indexes

#Make index.php as home page
DirectoryIndex index.php

#remove .php extensions
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]

# Protect files and directories from Others.
<FilesMatch ".(engine|inc|include|info|install|make|module|extensions|profile|test|po|sh|.*sql|theme|tpl(.php)?|xtmpl|svn-base)$|^(code-style.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
  Order allow,deny
</FilesMatch>

# Handel any 404 errors.
ErrorDocument 404 /index.php

# Override PHP settings.
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# Set the default handler.
DirectoryIndex index.php

# Overwrite till test
# PHP error handling for development servers
php_value error_reporting E_ALL
php_value error_reporting E_NOTICE
php_value error_reporting E_DEPRECATED
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag  log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0
php_value error_log /home/path/public_html/domain/PHP_errors.log
php_value error_reporting -1
php_value log_errors_max_len 0

<Files PHP_errors.log>
 Order allow,deny
 Deny from all
 Satisfy All
</Files>
# Remove above in production site

On Github License

Files

Download PDF of Htaccess file
REQUEST_FILENAME, REQUEST_URI

Comments

Apache