I have a WordPress site running nginx under a sub-direcotry. how can i write rewrite rules in a sub-directory? or can anyone please convert this Apache rewrite rule? I searc
try to use this, and please don't forget to replace root path!
location /main/ {
root /full/path/from/root/main/;
try_files $uri $uri/ /index.php?$args;
}
I've set wordpress on my host in folder /main and got it's working with next settings:
location /main {
index index.php;
try_files $uri $uri/ /main/index.php?q=$uri;
}
root /path/to/webroot;