If you want to redirect a client that requests
www.example.com to example.com, you could use an iRule like this:
when HTTP_REQUEST {
Check requested hostname (set to lower case)
if {[string tolower [HTTP::host]] eq "www.example.com"}{
Redirect client to example.com with the same URI
HTTP::redirect "http://example.com[HTTP::uri]
}
}
If this is for an HTTPS virtual server that both
www.example.com and example.com resolve to, you would need to get a cert which is valid for example.com and
www.example.com. You can get a 'Unified Communications Certificate' for this. Try searching these forums or the internet for details on this.
Aaron