Home /nginx /Fix Wordpress permalinks in NGINX /

Fix Wordpress permalinks in NGINX

2:17 am, April 23, 2017

Original Post Date: 5:06 am, August 8, 2014

Well not necessarily fix, but make them work under nginx anyway.

Basically, if you set the permalinks to the nice structure of sitename.com/my-nice-title they wont work by default, you will need to add this to your config. this will go under the server block for your site.

location / {
    index index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$args;
}

 

location / { index index.php index.html index.htm; try_files $uri $uri/ /index.php?$args; }