-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
45 lines (38 loc) · 1.49 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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]