Forum Discussion
redirect root URL to another URL
I have a public facing url cdn.mydomain.com that I need to redirect to mydomain.com if anyone goes to that site. There is nothing on the cdn website, it simply exist to feed other sites withing our environment, but has to maintain a public facing presence. The issue I have is cdn.mydomain.com is being used in several other websites for varies purposes but when I setup the redirect it break all the other sites. Below is the irule I've tried to get working. I've attempted it with just the equals "/" option but didn't change anything, other sites that call the cdn would get redirected as well. Am I missing something?
when HTTP_REQUEST { if { ([string tolower [HTTP::host]] equals "cdn.mydomain.com") || ([string tolower [HTTP::host]] equals ";)} { HTTP::respond 301 Location https://mydomain.com/ }
}
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