blob: 2c9b7f33b4e4af874f33280b07e5c97d770fb726 (
plain)
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
|
error_page 401 /httperror.php?e=401;
error_page 403 /httperror.php?e=403;
error_page 404 /httperror.php?e=404;
error_page 500 /httperror.php?e=500;
error_page 502 /httperror.php?e=502;
error_page 504 /httperror.php?e=504;
location /robots.txt {} #stop rewriting the robots.txt
location /favicon.ico {}
location /static {}
try_files $uri @main;
location ~* ^/login/?([a-z0-9]+=[a-z0-9]+(&[a-z0-9]+=[a-z0-9]+)?)?$ {
rewrite ^/?login([?/]?.*) /index.php?task=login&arguments=$1 last;
}
location ~* ^/logout/?(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {
rewrite ^/?logout([?/]?.*) /index.php?task=logout&arguments=$1 last;
}
location ~* ^/register/?(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {
rewrite ^/?register(\?[0-9a-zA-Z]*(=[0-9a-zA-Z]*)?)? /index.php?task=register&arguments=$1 last;
}
location ~* ^/invite/?(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {
rewrite ^/?invite(\?[0-9a-zA-Z]*(=[0-9a-zA-Z]*)?)? /index.php?task=invite&arguments=$1 last;
}
location ~* ^/user/?(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {
rewrite ^/?user(\?[0-9a-zA-Z]*(=[0-9a-zA-Z]*)?)? /index.php?task=user&arguments=$1 last;
}
location ~* ^/download/?(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {
rewrite ^/?download(\?[0-9a-zA-Z]*(=[0-9a-zA-Z]*)?)? /index.php?task=download&arguments=$1 last;
}
location ~* ^/password_recover/?(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {
rewrite ^/?password_recover(\?[0-9a-zA-Z]*(=[0-9a-zA-Z]*)?)? /index.php?task=password_recover&arguments=$1 last;
}
#location ~* \.php(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {} #empty block to catch all
location @main {
rewrite ^/([0-9a-zA-Z-_]+)$ /index.php?name=$1&folder= last;
rewrite ^/([0-9a-zA-Z-_]+)/(.*)$ /index.php?name=$1&folder=$2 last;
rewrite ^/$ /index.php last;
break;
}
|