-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
30 lines (24 loc) · 1.23 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
# Apache configuration file (see httpd.apache.org/docs/2.2/mod/quickreference.html)
# This file contains URL rewriting rules for the application
# Enable rewrite engine
RewriteEngine on
# Intercept rules like
# http://myserver/mypage
# and transform them into http://myserver/index.php?page=mypage&subpage=home
# where 'myserver' is the name of the server (written automatically), without
# the need of clarifying anything else.
# 'mypage' is instead what gets written immediately after the server name.
# The redirection rule redirects all traffic to index.php, which
# handles all requests and send them to the proper scripts.
# The [QSA] portion appends the remaining of the query to the rewriting
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?page=$1&subpage=home [QSA]
# This rules intercepts all URLs like
# http://myserver/mypage/mysubpage
# rewriting into http://myserver/index.php?page=mypage&subpage=mysubpage
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ index.php?page=$1&subpage=$2 [QSA]
# Error reporting
# php_flag display_errors on
# php_value error_reporting 2039
# Error pages
ErrorDocument 403 /fisherman-locator-new/index.php?page=loadPageErr403
ErrorDocument 404 /fisherman-locator-new/index.php?page=loadPageErr404