Author Topic: 404 Not Found - WordPress Pretty Links doesn't work  (Read 5640 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
404 Not Found - WordPress Pretty Links doesn't work
« on: January 23, 2019, 05:11:26 PM »
Hello Guys!

I am new on CentOS. I have installed the CWP7 with Nginx Only webserver. Hovewer, I have trouble problem with permalinks on my WordPress site.

When I use the "ugly links"  (?p=123) - it works well, but not with enabled pretty links - then on each subpages I see:
Quote
404 Not Found
nginx/1.14.2

I spend all day on it, without success. Please help.

Offline
*
Re: 404 Not Found - WordPress Pretty Links doesn't work
« Reply #1 on: January 23, 2019, 07:44:55 PM »
Ok, I fixed! :)

Edit:
Code: [Select]
sudo nano etc/nginx/conf.d/vhosts/DOMAIN_NAME.conf
And add this code in location block:
Code: [Select]
try_files $uri $uri/ /index.php?q=$uri&$args;

Offline
*
Re: 404 Not Found - WordPress Pretty Links doesn't work
« Reply #2 on: January 24, 2019, 10:14:50 AM »
Thank you. It save me a lot of time.