-
Notifications
You must be signed in to change notification settings - Fork 2
/
.htaccess
39 lines (27 loc) · 1.1 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
#CORS options
Header Set Access-Control-Allow-Origin "*"
php_flag display_errors on
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
RewriteEngine On # Turn on the rewriting engine
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
# Tasks
RewriteRule ^tasks/([0-9]+)$ controller/task.php?taskid=$1 [L] # Handle task id
# completed and incompleted tasks
RewriteRule ^tasks/complete$ controller/task.php?completed=Y [L]
RewriteRule ^tasks/incomplete$ controller/task.php?completed=N [L]
# Pagination
# map: ^tasks/page/([0-9]+) points to controller/task.php?page
RewriteRule ^tasks/page/([0-9]+)$ controller/task.php?page=$1 [L]
# tasks
# map: ^tasks points to controller/tasks.php
RewriteRule ^tasks$ controller/task.php [L]
# users
# map: ^users points to controller/tasks.php
RewriteRule ^users$ controller/users.php [L]
# sessions
# map: ^sessions points to controller/sessions.php
RewriteRule ^sessions$ controller/sessions.php [L]
# sessions
# map: ^sessions/3 points to controller/sessions.php?sessionid=3
RewriteRule ^sessions/([0-9]+)$ controller/sessions.php?sessionid=$1 [L]