I have an nginx setup with folder structure like this:
- www
|- splash
|- blog
www
is the root folder.
I would like to redirect users who access http://example.com
to the splash
folder.
But I don't want the URL in the address bar to change to http://example.com/splash
.
The URL in the address bar should still be http://example.com
.
This rule should only apply when user accesses the root folder.
Meanwhile accessing the blog
folder will be as usual via: http://example.com/blog
.
How do I achieve this? So far my conf is as follow: (they don't work btw, the URL is changed)
server {
listen 80;
server_name www.example.com;
root /www;
location = / {
rewrite ^/(.*)$ splash/$1 permanent;
}
}