Nginx wordpress rewrite

From KOP KB
Revision as of 22:05, 10 August 2017 by ReMaster (talk | contribs)
Jump to: navigation, search

First example here is for the main root directory

location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

This example is for sites that are in subfolders from the web root of the domain.

location /path/to/wordpress/ {
        try_files $uri $uri/ /path/to/wordpress/index.php$is_args$args;
    }