Forum Discussion
jp_124742
Nimbostratus
Dec 24, 2013URL Redirection
Hi
i need to redirect the url https://14.140.248.168 to https://abc.com , pls help
1 Reply
- nitass
Employee
you can use HTTP::redirect.
HTTP::redirect wiki
https://devcentral.f5.com/wiki/iRules.http__redirect.ashxe.g.
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar ltm virtual bar { destination 172.28.20.15:443 ip-protocol tcp mask 255.255.255.255 profiles { clientssl { context clientside } http { } tcp { } } rules { myrule } source 0.0.0.0/0 vs-index 25 } root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule myrule ltm rule myrule { when HTTP_REQUEST { if { [HTTP::uri] equals "/" } { HTTP::redirect "https://abc.com" } } } [root@ve11a:Active:In Sync] config curl -Ik https://172.28.20.15 HTTP/1.0 302 Found Location: https://abc.com Server: BigIP Connection: Keep-Alive Content-Length: 0
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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