Forum Discussion
hooleylist
Jan 27, 2009Cirrostratus
As Wiesmann suggests, you could use an HTTP class to perform the redirection if you're on 9.4 or higher. Else, you could use a simple iRule.
For rewriting the request (as opposed to redirecting to a new location)...
According to RFC2616 you can use a fully qualified reference in the URI. The server must then ignore the host header. But it might be confusing for troubleshooting if you see one hostname in the URI and a different one in the host header. To avoid this, you could use 'HTTP::header replace Host $new_host' to update the host header and HTTP::uri to update the URI:
HTTP::header replace Host "www.allforme.com"
HTTP::uri [string map { /player /maintenance } [HTTP::uri]]
Aaron