Forum Discussion
Mike_Roe_60070
Nimbostratus
Feb 18, 2011URL and 301 Re-Write
Hi All, Im hoping someone can help me out. I have a need to have one site (which has SSO with APM) be known in the world as 8. In this instance the site my.company.com has an SSO profile that is tied ...
Mike_Roe_60070
Nimbostratus
Feb 18, 2011Thnaks Aaron, I had just gotten something similar working as you were replying.
when ACCESS_ACL_ALLOWED {
set sid [ACCESS::session data get "session.keydb"]
HTTP::cookie insert name "MRHSession" value "$sid"
}
when HTTP_REQUEST {
set origHeader [HTTP::header Host]
log local0. "Origional header value: $origHeader"
HTTP::header replace Host "mysb.winwholesale.com"
log local0. "New header value: [HTTP::header Host]"
virtual my_jboss_sb_vs
}
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
if { [HTTP::header Location] contains "mysb.winwholesale.com" } {
log local0. "Original Location value: [HTTP::header Location]"
HTTP::header replace Location [string map -nocase {mysb.winwholesale.com sb.winnelson.com} [HTTP::header value Location]]
log local0. "New Location value: [HTTP::header Location]"
}
}
}
This works but it will only work for 1 out of 8 domains. What I mean is that since I have the SSO in play which i believe uses the MRHSession that is set in the ACCESS_ACL_ALLOWED section I need to reuse the same MRHSession when I change domains. In this rule my goal is to be able to type *.winnelson.com/anyuri or *.winair.com/anyuri and either way i get to mysb.winwholesale.com/anyuri.
Im thinking I can do it if I can switch out the domain on the way in and out but i cant figure out how to let the response know what the hostname was in the origional request.
Hope this makes sense.
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