-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
55 lines (54 loc) · 2.76 KB
/
nginx.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
error_page 404 /index.php?action=404;
error_page 403 /index.php?action=403;
location = /check {
rewrite ^(.*)$ /process.php?actiontype=check last;
}
location /util {
rewrite ^/util/([a-z0-9-_]+)$ /index.php?action=util&sub=$1 last;
}
location /user {
rewrite ^/user/([A-Za-z0-9_]+)$ /index.php?action=user&sub=$1 last;
rewrite ^/user/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)$ /index.php?action=user&sub=$1&p1=$2 last;
rewrite ^/user/([A-Za-z0-9_]+)/([A-Za-z0-9_]+)/([A-Za-z@._0-9]+)$ /index.php?action=user&sub=$1&p1=$2&p2=$3 last;
}
location /teacher/proc {
rewrite ^/teacher/proc/([A-Za-z0-9_\-]+)$ /process.php?isteacher=yes&action=teacher&actiontype=$1 last;
}
location /teacher {
rewrite ^/teacher/([A-Za-z0-9_]+)$ /index.php?action=teacher&action_type=$1 last;
}
location /searchall {
rewrite ^/searchall/([0-9]+)$ /index.php?action=searchall&page=$1 last;
}
location = /searchall {
rewrite ^(.*)$ /index.php?action=searchall last;
}
location /board {
rewrite ^/board/([^/]*)$ /index.php?action=board&bid=$1&bact=list last;
rewrite ^/board/(.*?)/page/([0-9]+)$ /index.php?action=board&bid=$1&bact=list&page=$2 last;
rewrite ^/board/([A-Za-z0-9@:_\-]+)/([A-Za-z0-9_\-]+)$ /index.php?action=board&bid=$1&bact=$2 last;
rewrite ^/board/([A-Za-z0-9@:_\-]+)/([A-Za-z0-9_\-]+)/([0-9]+)$ /index.php?action=board&bid=$1&bact=$2&bitm=$3 last;
rewrite ^/board/([A-Za-z0-9@:_\-]+)/([A-Za-z0-9_\-]+)/([0-9]+)/([0-9]+)$ /index.php?action=board&bid=$1&bact=$2&bitm=$3&bcmt=$4 last;
}
location /ajax {
rewrite ^/ajax/([a-z0-9_\-]+)/([a-z0-9_\-]+)$ /process.php?actiontype=$1&action=$2 last;
}
location /proc {
rewrite ^/proc/([a-z0-9_\-]+)/([a-z0-9_\-]+)$ /process.php?actiontype=$1&action=$2 last;
}
location / {
rewrite ^/((sitemap|contacts|admin|schedule|judicial))$ /index.php?action=$1 last;
}
location = /files/captcha/0.png {
rewrite ^(.*)$ /process.php?actiontype=file&action=captcha last;
}
location /files {
rewrite ^/files/captcha/([0-9]+).png$ /process.php?actiontype=file&action=captcha&renew last;
rewrite ^/files/bbs/([0-9]+)/([0-9]+)/([0-9]+)/([a-z0-9_]+)/sizemode_([0-9]+)/([^/]+)$ /process.php?actiontype=file&action=attach&bid=$1&aid=$2&fid=$3&fkey=$4&fname=$6&mode=sizemode_$5 last;
rewrite ^/files/bbs/([0-9]+)/([0-9]+)/([0-9]+)/([a-z0-9_]+)/force/([^/]+)$ /process.php?actiontype=file&action=attach&bid=$1&aid=$2&fid=$3&fkey=$4&fname=$5&mode=force last;
rewrite ^/files/bbs/([0-9]+)/([0-9]+)/([0-9]+)/([a-z0-9_]+)/([^/]+)$ /process.php?actiontype=file&action=attach&bid=$1&aid=$2&fid=$3&fkey=$4&fname=$5&mode=normal last;
rewrite ^/files/bbs/([0-9]+)/([0-9]+)/([^/]+).zip$ /process.php?actiontype=file&action=attach_zip&bid=$1&aid=$2 last;
}
location /api {
rewrite ^/api/(.*)$ /process.php?actiontype=api&action=$1 last;
}