diff options
Diffstat (limited to 'blob/nginx_rewrite_rules')
| -rwxr-xr-x | blob/nginx_rewrite_rules | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/blob/nginx_rewrite_rules b/blob/nginx_rewrite_rules new file mode 100755 index 0000000..571c3fe --- /dev/null +++ b/blob/nginx_rewrite_rules @@ -0,0 +1,70 @@ +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 {} + +location ~* ^/liste { + rewrite ^/liste/?$ /index.php?task=liste; + rewrite ^/liste/([0-9]+)/?$ /index.php?task=liste&id=$1; +} + +rewrite ^/quote/?$ /index.php?task=quote; +rewrite ^/quote/([0-9]+)/?$ /index.php?task=quote&id=$1; +rewrite ^/new_member/? /index.php?task=new_member; +rewrite ^/update/? /index.php?task=update; +rewrite ^/Startseite/? /index.php; +rewrite ^/startseite/? /index.php; +rewrite ^/help/? /help.php; +rewrite ^/hilfe/? /help.php; +rewrite ^/services?/? /index.php?task=services; + +location ~* ^/account { + rewrite ^/account/?$ /index.php?task=account; + rewrite ^/account/change:(user)/?$ /index.php?task=account&change=$1; + rewrite ^/account/change:(password)/?$ /index.php?task=account&change=$1; +} + +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 / { +# rewrite ^/([0-9a-zA-Z-_]+)/(.*) /index.php?name=$1&folder=$2 last; +# rewrite ^/([0-9a-zA-Z-_]+)$ /index.php?name=$1&folder= last; +# rewrite ^/$ /index.php last; +# break; +#} |
