Reputation: 1065
I have:
How can I "rewrite" doma.in/blog to the blog, but with this same URL? (without redirect).
Upvotes: 4
Views: 517
Reputation: 2944
Try this nginx configuration:
location ^/blog {
rewrite /blog(.*) $1 break; #cut the /blog path
proxy_pass http://blog.com:8000; #then pass it to the blog domain/port
proxy_redirect off; #without redirecting
proxy_buffering off; #or buffering
}
As for angular, it simply needs to avoid/skip the route, as discussed here on SO
Upvotes: 2