Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need to change request host & uri before reaching server

Mohamed_Fathy
Nimbostratus
Nimbostratus

we've a website where the user access it using "subdomain.domain1.com" (its public DNS), but we need need BIG-IP LTM to change the hostname & uri before reaching server so to be "domain2.com\uri". may you help?

1 REPLY 1

Hello Mohamed.

You can try something like this:

when HTTP_REQUEST {
	if { [HTTP::host] equals"subdomain.domain1.com"} {
		HTTP::header replace Host "domain2.com"
		HTTP::uri /uri[HTTP::uri]
	}
}

This example modifies Host header and also concats "/uri" string to the whole URI sentence.

Regards,

Dario.

Regards,
Dario.