Forum Discussion
iRule or LTM Policy to pre-fix desired www. sites
What is the reason in your example that https://abc.com doesn't work? Is it because there isn't a DNS-record? In that case you could use the RESOLVER::name_lookup to see if it's a valid record. If not, add www. to it.
To be honest I'm not sure. I do see that abc.com and www.abc.com resolves differently but I feel like its something to do on Akamai as the traffic hits there before it gets directed to the F5 VS.
Looking at this more, http://abc.com, http://www.abc.com and https://www.abc.com all work. Just not https://abc.com nor does it redirect.
- Oct 24, 2023
Okay, then it seems abc.com and www.abc.com are different sites and abc.com isn't configured to handel HTTPS traffic. In that case you are probably better of using two datagroups. One datagroup that lists all allowed hostnames and another that contains hostnames that should be excluded from having put www. to it. Then let the iRule decide if it's allowed and/or it's needs to be modified with the start of www.
- DoubleJzOct 24, 2023
Nimbostratus
Understood. I created a new datagroup Datagroup_exclude and placed the subdomain sites in it. I guess I went full circle back to my original question now though. How would you go about checking to see if it needs to be modified with www and exlude those in the new datagroup?
- PauliusOct 24, 2023
MVP
DoubleJz Can you provide a few examples of ones that would need to be excluded and which ones wouldn't? Also, if https://abc.com/ doesn't work but https://www.abc.com/ does work most likely all paths associated to just "abc.com" will not work because the root doesn't work. You really should look into where "abc.com" and "www.abc.com" point to and what host they are listening for in your web server configuration.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com