Open your nginx configuration file:
# nano /etc/nginx/nginx.conf
Locate your domain (example.com) virtual hosting configuration and before “location ~ \.php$ {” add following lines:
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?q=$1 last;
break;
}
At the end your configuration should look as follows:
server {
server_name example.com;
[...]
Aleksandar Savic
simplicity is beautiful