Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: luki2p on January 23, 2019, 05:11:26 PM

Title: 404 Not Found - WordPress Pretty Links doesn't work
Post by: luki2p 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.
Title: Re: 404 Not Found - WordPress Pretty Links doesn't work
Post by: luki2p 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;
Title: Re: 404 Not Found - WordPress Pretty Links doesn't work
Post by: ekgrad on January 24, 2019, 10:14:50 AM
Thank you. It save me a lot of time.