Forum Discussion
Rajesh_74831
Nimbostratus
Jul 25, 2014need to redirect http://abc.com to www.abc.com
I would need help to setup an irule which can redirect all requests to http://abc.com to www.abc.com.
Thanks
-Rajesh
5 Replies
- MiLK_MaN
Nimbostratus
when HTTP_REQUEST { if { [HTTP::host] eq "abc.com" } { HTTP::redirect http://www.abc.com } }
- Rajesh_74831
Nimbostratus
Thanks Milk_MaN ...it worked like a charm.
- MiLK_MaN_61922
Nimbostratus
when HTTP_REQUEST { if { [HTTP::host] eq "abc.com" } { HTTP::redirect http://www.abc.com } }
- Rajesh_74831
Nimbostratus
Thanks Milk_MaN ...it worked like a charm.
We use an iRule on multiple VIPs, so we went with this instead:
when HTTP_REQUEST { if {not ([HTTP::host] starts_with "www")} { HTTP::redirect "http://www.[HTTP::host][HTTP::uri]" } }
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