1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-09-20 07:31:53 +02:00
polr/.nginx-config
Chaoyi Zha d55ccf1d16 Add nginx configuration, #56
May have to add instructions in setup for the future
Thanks @david-song for reporting this issue.
2014-11-29 17:59:01 -05:00

23 lines
608 B
Plaintext

# =========================
# Polr nginx redirect rules
# http://github.com/cydrobolt/polr
# Append this file to your nginx configuration
# Please note that this configuration is experimental,
# and may have issues.
# =========================
location = /api {
rewrite ^(.*)$ /api.php break;
rewrite ^(.*)$ /api.php break;
}
location / {
if (!-e $request_filename){
rewrite ^/([a-zA-Z0-9]+)\?([a-zA-Z0-9]+)$ /r.php?u=$1&lkey=$2 break;
}
rewrite ^/([a-zA-Z0-9]+)/?$ /r.php?u=$1 break;
rewrite ^/?\+([a-zA-Z0-9]+)$ /stats.php?bv=$1 break;
}
location /t {
rewrite ^/t-([a-zA-Z0-9]+)/?$ /r.php?u=t-$1 break;
}