Forum Discussion
Dbow_21284
May 20, 2010Nimbostratus
Well actually nothing fails. ... The developers are really **bleep** about the URL being switched to www.mydomain.com in the browser. I think there is a big push from marketing on this as well. ... Dont even get me started.
Anyway, right now I have a HTTP and HTTPS VS for this site. The HTTP site has an iRule on it that has an all-encompassing redirect on it to https://www.mydomain.com (to the HTTPS VS basically). Thus, for the case where the user explicitly puts in just https://mydomain.com without the "www" prefix it remains at https://mydomain.com.
Thus, there isn't an issue per se. The developers say they need it this way for some reason. At this point it is a personal challenge to get this working for me, otherwise I probably wouldn't worry about it. I have tried redirects, HTTP::header replace, and http response rewrites on the HTTPS VS without any luck.
Stumped....
PS: The response headers come back mydomain.com:443 ... I have tried an iRule to rewrite this and that didnt work either. I used an iRule from someone else who stated it was successful for them ... here it goes.
when HTTP_RESPONSE {
set nowwwHost "mydomain.com"
set wwwHost "www.mydomain.com"
set location [HTTP::header location]
if { $location starts_with $nowwwHost } {
regsub -all $nowwwHost $location $wwwHost newLocation
HTTP::header replace location $newLocation
}
}
I have thrown in dummy URLs to redirect to and headers to rewrite that arent even related to the site in all my attempts. Its like the iRules aren't even being processed.