user7530915
user7530915

Reputation: 21

URL based request headers in Akamai

I have a requirement where I need to have separate vhosts file in apache for same domain and different path. The reason behind separate vhosts is something for business use case.

All I want to know is that for different URL what kind of settings can be introduced on Akamai CDN so that I have different host headers sent to my webserver. for eg. www.foo.com/abc sends a host header of abc.foo.com

Any other solution is also appreciated

Upvotes: 1

Views: 694

Answers (1)

Josh Cheshire
Josh Cheshire

Reputation: 344

Yes, you can specify what Host header is sent to your origin based on any number of criteria including the path. There are a few ways you can do this. Here's one example.

  1. Create and declare Property Variable(s) to hold the pieces of the requesting path that you want to use for generating the origin Host value. Property Variable Declaration
  2. Create behaviors that extract the pieces of the path you want to use for constructing the origin Host header. In this case, I'm pulling out the first part of the path and storing it as PMUSER_ORIGINHOST_PART1 and the second part of the path as PMUSER_ORIGINHOST_PART2. (Documentation on how to use the "Path Component Offset" is at techdocs.akamai.com.) enter image description here
  3. Finally, use the variables to construct a custom value for the Host header going to your origin like below. enter image description here

Upvotes: 1

Related Questions