server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.php index.html index.htm;
server_name *hidden*;
location / {
try_files $uri $uri/ =404;
rewrite ^/(|/)$ /index.php?url=$1;
rewrite ^/([a-zA-Z0-9_-]+)(|/)$ /index.php?url=$1;
rewrite ^/(.*)\.htm$ /$1.php;
rewrite ^/(|/)$ /dash.php?page=$1;
rewrite ^/([a-zA-Z0-9_-]+)(|/)$ /dash.php?url=$1;
rewrite ^/novote/register /register;
rewrite ^/habbo-imaging/badge/([^/]+) /habbo-imaging/badge.php?badge=$1;
}
location ~* ^.+\.(jpg|jpeg|gif|png|ico|swf|SWF|flv)$ {
access_log off;
expires 30d;
}
location /ase {
rewrite ^/ase/(|/)$ /ase/index.php?url=$1;
rewrite ^/ase/([a-zA-Z0-9_-]+)(|/)$ /ase/index.php?url=$1;
rewrite ^/ase/(.*)\.htm$ /ase/$1.php;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}