Hello Yumi
Thanks for the update. My current set up is
root /var/www
location = / {
root /var/www/home
}
M requrirement is
site.com /var/www/home
site.com/blog /var/www/blog
site.com/user /var/www/user
site.com/anything /var/www/anything
That is when I try site.com it should load from /var/www/home everything else should read from /var/www
It works with following configuration
root /var/www;
location = / {
rewrite ^ /home break;
}
But issue is site.com will redirect to site.com/home
This redirection can avoid by adding a '/' after home
root /var/www
location = / {
rewrite ^ /home/ break;
}
With above setup when I try site.com it will load index.html from /var/www/home as needed. But it is not reading css,js folders from same location it is trying load those folders from /var/www
Thanks for the update. My current set up is
root /var/www
location = / {
root /var/www/home
}
M requrirement is
site.com /var/www/home
site.com/blog /var/www/blog
site.com/user /var/www/user
site.com/anything /var/www/anything
That is when I try site.com it should load from /var/www/home everything else should read from /var/www
It works with following configuration
root /var/www;
location = / {
rewrite ^ /home break;
}
But issue is site.com will redirect to site.com/home
This redirection can avoid by adding a '/' after home
root /var/www
location = / {
rewrite ^ /home/ break;
}
With above setup when I try site.com it will load index.html from /var/www/home as needed. But it is not reading css,js folders from same location it is trying load those folders from /var/www