Forum Discussion
Redirect user to external URL
Hi,
I have one requirement for the URL rewrite.
i want my internal and external users they hit on
www.mycompany.com it should redirect to the external website to www.somewhereelse.com
I have created internal and exteranl dns record for www.somewhereelse.com (Public IP address of the website).
But i dont have any node/pool etc locally. All is hosted over the Internet. How can I configure rules in F5 to redirect all the users to external website www.somewhereelse.com.
You can try and implement this iRule:
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "www.mycompany.com" } { HTTP::redirect "http://www.somewhereelse.com" } }
You will not need any pool for that. Just apply to the virtual server that handles www.mycompany.com. The client will resolve www.somewhereelse.com on his own and reconnect to the www.somewhereelse.com resource.
3 Replies
You can try and implement this iRule:
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "www.mycompany.com" } { HTTP::redirect "http://www.somewhereelse.com" } }
You will not need any pool for that. Just apply to the virtual server that handles www.mycompany.com. The client will resolve www.somewhereelse.com on his own and reconnect to the www.somewhereelse.com resource.
- Cory_50405
Noctilucent
Can you just create a CNAME in your DNS for www.mycompany.com, directing users to www.somewhereelse.com?
- Wasim_Hassan_13
Nimbostratus
Hi,
I have created a VIP in F5 with (192.168.210.156) and attached the Irule with it.
when HTTP_REQUEST {
and it is working.
I cannot create the CNNAME but /done/test is not support in DNS server.
thanks for the prompt reply and solution.
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