8

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

Auxiliary
  • 2,687
  • 5
  • 37
  • 59

1 Answers1

17

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

more info

Radek
  • 13,813
  • 52
  • 161
  • 255
  • 1
    Remember to [add the site relative path](http://stackoverflow.com/questions/8876462/nginx-rewrite-rule-under-a-subdirectory) if your WP install is not the site root – New Alexandria May 26 '13 at 02:08
  • 1
    For my setup adding that changes the error to a 500 redirect loop. – Dobler Apr 13 '17 at 22:27