diff options
| author | root | 2014-04-16 14:08:50 +0200 |
|---|---|---|
| committer | root | 2014-04-16 14:08:50 +0200 |
| commit | 8633f22c7adad5f2c97567afcd5a332bfacd7a00 (patch) | |
| tree | 5742343ef793e08101a55c5e0f592fa89de4cdcb /blob | |
| parent | 3dc852b163daba5fa59499215f8b725a6f0a39eb (diff) | |
| download | files.iamfabulous.de-8633f22c7adad5f2c97567afcd5a332bfacd7a00.tar.gz | |
added try_files (experimental)
Diffstat (limited to 'blob')
| -rwxr-xr-x | blob/nginx_rewrite_rules | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/blob/nginx_rewrite_rules b/blob/nginx_rewrite_rules index e6783f0..2c9b7f3 100755 --- a/blob/nginx_rewrite_rules +++ b/blob/nginx_rewrite_rules @@ -11,28 +11,30 @@ location /robots.txt {} #stop rewriting the robots.txt location /favicon.ico {} location /static {} -location ~* ^/?login/?([a-z0-9]+=[a-z0-9]+(&[a-z0-9]+=[a-z0-9]+)?)?$ { +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]*)?)?$ { +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]*)?)?$ { +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]*)?)?$ { +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]*)?)?$ { +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]*)?)?$ { +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; } @@ -41,9 +43,9 @@ location ~* ^/password_recover/?(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ { } #location ~* \.php(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {} #empty block to catch all -location / { - rewrite ^/([0-9a-zA-Z-_]+)/(.*) /index.php?name=$1&folder=$2 last; +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; } |
