Forum Discussion
URL rewriting
This might be what you need (the requirements weren't very clear);-
when HTTP_REQUEST {
if {[HTTP::path] eq "/"} {
HTTP::respond 301 Location "http://[HTTP::host]/HomePage/index.html"
return
}
}
- Mouene_240365Jan 21, 2017
Nimbostratus
Thank you for your reply , unfortunately this does not answer my question. I have the following iRule : when HTTP_REQUEST { HTTP::redirect } This iRule redirect users to the Internet , the public IP address that I used in this iRuel appears in the url in the browser after redirecting ex.:
My questin is how to hide this ip or replace it with any other name to be like the following:
Thanks,
- IheartF5_45022Jan 21, 2017
Nacreous
Is this what you need? Sorry still unclear on requirement.....
when HTTP_REQUEST { if {!([HTTP::Host] eq "anyname.com")} { HTTP::respond 301 Location "http://anyname.com/HomePage/index.html" return } }
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