HectorOrdonez/hecnelFramework/master/.htaccess - Htaccess File

HectorOrdonez/hecnelFramework/master/.htaccess

# Global Htaccess file.
#
# Project: Hecnel Framework
# User: Hector Ordonez
# @date: 18/06/13 21:00
# @todo - Later stage - Research about .htaccess.

php_flag display_errors on
php_value error_reporting 32767

# RewriteEngine tells Apache to process Rewrite commands.
RewriteEngine On
# RewriteBase defines what is going to be the base url. So localhost/index.php becomes localhost/hecnel/index.php
RewriteBase /projects/hecnel

# Error pages for fatal errors redirection - Authentication failed
ErrorDocument 401 http://localhost/projects/hecnel/error/authFailed
# Error pages for fatal errors redirection - Forbidden access
ErrorDocument 403 http://localhost/projects/hecnel/error/accessForbidden
# Error pages for fatal errors redirection - Page not found
ErrorDocument 404 http://localhost/projects/hecnel/error/resourceNotFound
# Error pages for fatal errors redirection - Internal Server Error
ErrorDocument 500 http://localhost/projects/hecnel/error/internalServerError

# Denies access to all php files to everyone.
<Files *.php> 
    deny from all
</Files>

# Exception to previous rule - index.php is allowed by everyone.
<Files "index.php">
    Allow From All
</Files>

# Exception to previous rule - CronJobManager.php is allowed by server.
<Files "CronJobManager.php">
    Order Deny,Allow
    Deny From All
    Allow From 127.0.0.1
</Files>

# Redirecting requests if not to a file or link.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

On Github License

Files

Download PDF of Htaccess file
REQUEST_FILENAME

Comments

Apache