Wordpress nginx rule to replace htaccess

As some of you may know, nginx does not work with mod rewrite, and therefor it does not work with any htaccess rewrite rules you may have.

You can have nginx load your wordpess using below rule to replace the original htaccess:

location / {


try_files $uri $uri/ /index.php?$args;

}

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

 Gzip compression enable on nginx

Working configuration for gzip and allowing some extensions to be compressed: gzip...

 Nginx Proxy timeout backend

If you have an nginx server that communicates with a server in the backend and it times out after...

 Too many open files error in nginx

If you receive below error in nginx log it means that the default limit for the nginx process was...