Reputation: 1478
I'm trying to prefix queries with www
using nginx.
Problem: While domain.com
and domain.com/about
gets prefixed with www, domain.com/c/3kl239zz
doesn't (at least it's not displayed in the browser bar).
Here are the nginx blocks:
# redirect block
server {
listen 80;
server_name domain.com;
return 301 https://www.domain.com$request_uri?;
}
# website block
server {
listen 443 ssl;
server_name www.domain.com;
...
}
Additional info:
test.domain.com
. domain.com/c/3kl239zz
, c
is an Angular
state, while 3kl239zz
is a db document reference.Upvotes: 1
Views: 68
Reputation: 7901
there is no problem with nginx . domain.com/about means domain.com with about state but where you are typing domain.com/c/3kl239zz this means domain.com with c folder with 3kl239zz state , got it. if you want this data you can give it in params domain.com/c?id=3kl239zz
Upvotes: 1