1 個回答
- 最新
- 最多得票
- 最多評論
0
I think it is possible with behavior settings.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehavior.html
I think "/blog/*" in the behavior's path setting will forward to "blog.mywebsite.com" when accessing "/blog" by setting the origin to "blog.mywebsite.com".
I think it will be fine if the "/example" is set up in the same way.
相關內容
- 已提問 1 年前
- 已提問 7 個月前
- AWS 官方已更新 4 個月前
- AWS 官方已更新 3 年前
The thing is, I d'ont have any CF distrib for mywebsite.com. How can I create one and still have this domain linked to my Webflow website?
The domain configured for Webflow must be configured for the CloudFront distribution. This would require us to change the domain that is currently set up for Webflow. I thought that if it was possible to set up a reverse proxy in Webflow, it would be OK not to set up CloudFront, but after a little research, it seemed difficult to do so.
@Riku_Kobayashi I start to understand. I created a CloudFront distribution, with these behaviors: path pattern - origin /blog - blog.example.com default (*) - example.com
Now I assume I have to delete the route 53 rule pointing example.com to my webflow, and point it toward this cloudfront distribution. But how can I still have example.com CNAME to proxy-ssl.webflow.com ?
Thanks a lot for your help!
The "example.com" should be associated with the CloudFront distribution in the Route53 alias record. Then point the default behavior to proxy-ssl.webflow.com. That is, accessing "https://example.com" will forward to the default origin "proxy-ssl.webflow.com", and accessing "https://example.com/blog" will forward to "blog.example.com". if accessed from.
path pattern - origin /blog - blog.example.com default (*) - proxy-ssl.webflow.com
Ok, so it nearly works: I have a Route53 "example.com" aliasing to my CF distribution, + my behaviors are:
path pattern - origin /blog - blog.example.com (priority 0) default (*) - blog-example.webflow.io (default domain given by webflow where my site is hosted) (priority 1)
When I go to example.com, I can see my webflow website (hosted on blog-example.webflow.io). But when I navigate to example.com/blog, I get a 404 Webflow page, as if Webflow is catching the page doesn't exist (which is true on Webflow). Shouldn't Cloudfront match the URL and redirect me to blog.example.com ?