Forum Discussion
Irule Vs rewrite - FQDN hostname
You don't need to specify https nor the port on the host header, cause those are specified elsewhere, https is by using a ssl servers profile and the port is at the pool member.
Alsop testing if uri starts with / is useless since all uris stars with /.
If I understand correctly your requirement, why not first redirecting user to target path, then doing just the host replacement.
Something like this that :
when HTTP_REQUEST {
if { [HTTP::uri] equals "/"}
{
HTTP::redirect "https://[HTTP::host]/your/full/path/something.html"
}
else {
HTTP::header replace Host ServerName.Domain.com
}
}
Hi Amine_Kadimi,
This is what I have from your suggestion. The replace host does not seem to execute. redirection does happen.
when HTTP_REQUEST {
if { [HTTP::uri] equals "/"}
{
HTTP::redirect "https://Servername:8443/etc/bc/ui5_ui5/ui2/ushell/shells/abap/page.html"
}
else {
HTTP::header replace Host FQDN
}
}
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