How to Add or Delete www in Requests?
About
How to Add or Remove "www" in Incoming Requests?
Even if the DNS records exist, your backend service may not accept the "www" subdomain in the incoming request, or it may be configured to accept the "www" subdomain even if it's not present in the DNS records. With an action defined on the TR7 ASP, the "www" subdomain information can be added or removed from requests.
Warning
In this article, "Set HTTP Header" Action is explained for subdomain manipulation. Similarly, "Location Redirection" Action can also be used for subdomain manipulation, allowing the addition or removal of the "www" subdomain.
Interface
Adding www
Step > 1
"Settings Mode > Traffic Manager > Actions" steps are followed. In the opened screen, click on the Add
button.
Step > 2
In the opened screen, select Action Type as "Set HTTP Header" and set the Execution Level to "On Request".
Step > 3
In the Header to Edit field, enter "Host", and in the Header Content field, enter "www.test.com". Then, set the desired condition (e.g., if the host header is test.com) and save the configuration.
Step > 4
The created action is defined in the corresponding vService.
Deleting www
Step > 1
"Settings Mode > Traffic Manager > Actions" steps are followed. In the opened screen, click on the Add
button.
Step > 2
In the opened screen, select Action Type as "Set HTTP Header" and set the Execution Level to "On Request".
Step > 3
The "Header to Edit" is set to "Host", and the "Header Content" is set to "test.com". Then, the desired condition (e.g., if the host header is "www.test.com") is saved.
Step > 4
The created action is defined in the corresponding vService.