Forum Discussion
NielsH_187296
Nimbostratus
Feb 15, 2015Rewriting HOST+URI does not work
Hi,
I'm using the following iRule to let the BigIP redirect a request for /webfront to website-webfront.domain.com. The redirecting should go via the BigIP, not via the client.
Source: http...
Torti_93733
Nimbostratus
Feb 15, 2015your irule is confusing. Do you want webfront-web.domain.com or web-webfront.domain.com?
try this:
if { ([HTTP::uri] starts_with "/webfront") } {
change host name option 1
HTTP::host "webfront-[HTTP::host]"
or option 2
HTTP::host "[substr [HTTP::host] 1 ".domain.com"]-webfront.domain.com"
trim uri
HTTP::uri [string map {"/webfront" ""} [HTTP::uri]]
}
- NielsH_187296Feb 15, 2015
Nimbostratus
I would like subdomain-webfront.domain.com - Torti_93733Feb 15, 2015
Nimbostratus
then option 2 should work - NielsH_187296Feb 16, 2015
Nimbostratus
Hmm, for some reason the internal application logs me out when applying this rule. - Torti_93733Feb 16, 2015
Nimbostratus
are you running https or http on the backend ? - StephanMantheyFeb 16, 2015
Nacreous
Is your application using cookies with authentication information? Perhaps the client stores a cookie from the initial servers response. Following requests are rewritten and references in server responses are pointing to another hostname. So the client will not send the initial cookie. In this case it would make sense to redirect the clients very first request to proper hostname and path instead of rewriting it.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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