简体   繁体   中英

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

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. 属性变量声明
  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.) 在此处输入图像描述
  3. Finally, use the variables to construct a custom value for the Host header going to your origin like below. 在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM