5

So I have 2 Wordpress sites hosted as such

  • http://siteA.mydomain.com
  • http://siteB.mydomain.com

I have a distribution created that has the 2 domains above as the origin.

  • siteA.mydomain.com
  • siteB.mydomain.com

I'm not sure how to configure the routes such that http://siteA.mydomain.com/wp-content/* will go to siteA's domain, and http://siteB.mydomain.com/wp-content/* will go to siteB's as the path pattern is the same.

Or should I create another distribution for siteB?

resting
  • 1,059
  • 2
  • 10
  • 10

1 Answers1

7

Create a second distribution.

CloudFront can select the origin server based on path pattern matching only -- not the hostname, or other request parameters.

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern

Michael - sqlbot
  • 21,988
  • 1
  • 57
  • 81