I would like to create a single behavior for more than one file extension type (e.g. *.html and *.php). Is there any way to do this with a single behavior? Separating the two paths with a | or a , isn't accepted.
Thanks for your help
You can configure a single CloudFront web distribution to serve different types of requests from multiple origins.
Path pattern. A path pattern (for example, images/*. jpg ) specifies which requests you want this cache behavior to apply to. When CloudFront receives an end-user request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution.
To use Amazon CloudFront, you: For static files, store the definitive versions of your files in one or more origin servers. These could be Amazon S3 buckets. For your dynamically generated content that is personalized or customized, you can use Amazon EC2 – or any other web server – as the origin server.
Precedence. As there can be more than one cache behavior that matches a given path ( /api/image. jpg is matched by both /api/* and *. jpg ), CloudFront needs to break this tie. Because of this, there is an ordering between the behaviors.
There is not a way to do this with CloudFront.
Each cache behavior only accepts one simple globbing pattern, with ?
matching exactly 1 character, and *
matching 0 or more characters. It isn't a regular expression match.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With