Forum Discussion
Ajinkya
Oct 14, 2020Altostratus
URL redirect with custom message
Hi All,
can some one help me with the irule with below requirements;
1] redirect URL from https://abc.com to https://xyz.com
2] Prompt message on user browser that, "you are now redirecting to new link: https://xyz.com"
This is really required on urgent basis. can some please help me to meet these conditions.
Hi Ajinkya,
Can you try this iRule?
when HTTP_REQUEST { if { [HTTP::host] equals "www.abc.com" } { HTTP::respond 200 content "<html> <h1 style='color:red; font-size:40px;'>You are now redirecting to new link: https://xyz.com</h1> <meta http-equiv='refresh' content='5; url=https://www.xyz.com' /> </html>" } }
Hi Ajinkya,
Can you try this iRule?
when HTTP_REQUEST { if { [HTTP::host] equals "www.abc.com" } { HTTP::respond 200 content "<html> <h1 style='color:red; font-size:40px;'>You are now redirecting to new link: https://xyz.com</h1> <meta http-equiv='refresh' content='5; url=https://www.xyz.com' /> </html>" } }
- AjinkyaAltostratus
HI Eaa,
Thanks for your response!!
This works perfectly.😀
Thank you so much !
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects