CloudFront: path routing without trailing slash

0

There are two CloudFront Behaviros.
If URL path is /articles/ or /articles/123, it will be routed to the server under ELB, but if /articles, it will be routed to S3.
I want to configure accesses to be routed to ELB even without trailing slash.  

Can anyone give me some advice?
Should I write a CloudFront Function to redirect or modify the path pattern to solve this problem?

PriorityPath patternOrigin
0/articles/*ELB
1default(*)S3
asked 2 years ago1974 views
1 Answer
1
Accepted Answer

Hi

you ca just change Cloudfront path to /articles* instead of /arcticles/* so all paths starting with /articles will be forwarded to ELB,

basically cloudfront uses path pattern so you can set the * in any part of your path

wish that works for you

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions