Redirect root to WordPress subfolder under nginx
Use this:
location = / {
return 301 http://example.com/blog;
}
The key here is the =
, which makes nginx apply this rule only to requests arriving to root folder, nowhere else.
Use this:
location = / {
return 301 http://example.com/blog;
}
The key here is the =
, which makes nginx apply this rule only to requests arriving to root folder, nowhere else.