Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nginx - 404 not found page for permalinks [closed]

Me and my friend have had a website (http://www.ferfereh.ir - sorry not english) for a year. We've been using a Linux Apache host with wordpress installed. Now suddenly all of our posts (which had a permalink structure = /%category%/%postname%.html) have broke and says:

404 Not found

nginx

Maybe our host provider has installed NginX. I don't know what Nginx exactly is but I read somewhere that it has some conflicts with the .htaccess configurations which makes our permalinks, is that right.

What should I do?

Many Thanks

like image 580
Auxiliary Avatar asked Sep 12 '10 15:09

Auxiliary


People also ask

Why am I getting 404 not found nginx?

Essentially, the “404 error” indicates that your or your visitor's web browser was connected successfully to the website server or the host. However, it was unable to locate the requested resource, such as filename or any specific URL.

How do I fix 404 page not found?

The simplest and easiest way to fix your 404 error code is to redirect the page to another one. You can perform this task using a 301 redirect. What's 301, you may ask? It's a redirect response code that signals a browser that the content has been transferred to another URL.

Why am I receiving a 404 not found when I try to access a route other than?

Error 404 not found is one of the most common issues you may encounter while browsing. This HTTP status code means the requested page can't be found on the website server. It may indicate a flaw with a hosting service or your domain name system (DNS) configuration settings.


1 Answers

try_files $uri $uri/ /index.php?q=$uri&$args; solves the problem nicely. Do not forget to restart nginx!

more info

like image 106
Radek Avatar answered Oct 29 '22 14:10

Radek