-
Notifications
You must be signed in to change notification settings - Fork 5
/
htaccess.conf
39 lines (29 loc) · 1.37 KB
/
htaccess.conf
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
RewriteBase /
RewriteEngine on
# I'm pretty sure that I could use the [OR]... but it does not work a fuck!
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
#RewriteCond %{REQUEST_FILENAME} -d
#RewriteRule ^ - [L]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^ - [L]
# Skip Apache aliases
# javascript is from the `libjs-jquery` package
# icons is from Apache
RewriteRule ^javascript - [L]
RewriteRule ^icons - [L]
# Skip DirectoryIndex (add other files if you have it)
RewriteRule index.php$ - [L]
# xml API to current year schedule
RewriteRule ^xml/?$ /api/tagliatella.php [L,PT]
# The user page
RewriteRule ^([0-9]{4})/user/([\w.-]+)/?$ /$1/user.php?conference=$1&uid=$2 [L,QSA]
# \ \ / /
# \ °-------> user_uid <------------- /------°
# °----------------------> conference_uid <-------°
# The chapter uid is only for SEO
RewriteRule ^([0-9]{4})/([\w.-]+)/([\w.-]+)/?$ /$1/event.php?conference=$1&chapter=$2&uid=$3 [L,QSA]
# \ \ \ / / /
# \ \ °--> event_uid <------------------/----------/-------°
# \ °-----------> chapter_uid <---------------/----------°
# °---------------------> conference_uid <-----------°