I have:
How can I "rewrite" doma.in/blog to the blog, but with this same URL? (without redirect).
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.