Tag Archives: wordpress

Nginx and WordPress setup clean SEO friendly URLs

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; index index.php; root /var/www/example.com; if (!-e $request_filename) { [...]