nginx - 404 not found page for permalinks

Auxiliary picture Auxiliary · Sep 12, 2010 · Viewed 13.4k times · Source

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

Answer

Radek picture Radek · Nov 6, 2010

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

more info