I am trying to set the rewrite rules in NGINX and I currently have some set for
location / {
already for my main website on that domain.
I would like to insall wordpress in a different folder so my location / {
needs to be location /page {
I can’t seem to set the rewrite rules up for this?
Any help would be great I have tried.
Rewrite rules for wordpress 3.0 (multi-site) for nginx?
Doesn’t seem to work.
Using this < I can get the page to show up for each user but with no images, css all the other files needed. Its only in plain text.
location /page {
root /home/domain/public_html;
index index.html index.htm index.php;
if (!-e $request_filename ) {
rewrite ^/page/(.*)$ /page/1$ last;
}
}
I need some rules that can be used for the /page location.
You have a small typo:
Rather than using:
Please try:
Regex captures value is
$1
, not in1$
😉You will need to change few more things. Here is a complete config – http://rtcamp.com/tutorials/wordpress-nginx-multisite-subdirectories-in-subdirectory-itself/