Forum Discussion
Ahmad_03_151082
Nimbostratus
Jun 10, 2015exclude URL
hi
i have website something.com this website hosted another website anything.com i have enabled SSL on something.com after that it is enabled also in anything.com now because the common name for...
nitass
Employee
Jun 10, 2015is anything.com http or https?
if https, do you have anything.com certificate and private key?
- Ahmad_03_151082Jun 10, 2015
Nimbostratus
it is http but now it is working as https - nitassJun 10, 2015
Employee
you have 2 virtual servers; one is http and the other one is https, haven't you? something.com is https but anything.com is http. am i correct? - Ahmad_03_151082Jun 10, 2015
Nimbostratus
yes . something.com is a portal and anything.com is virtual portal - nitassJun 10, 2015
Employee
so, if something.com hits http virtual server, we should redirect it to https, shouldn't we? if anything.com hits https virtual server, user will get certificate warning because there is no anything.com certificate anyway. is my understanding correct? - Ahmad_03_151082Jun 10, 2015
Nimbostratus
exactly - nitassJun 10, 2015
Employee
e.g. configuration [root@ve11b:Active:In Sync] config tmsh list ltm rule qux ltm rule qux { when HTTP_REQUEST { if { [HTTP::host] equals "something.com" } { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } } } test [root@ve11b:Active:In Sync] config curl -I http://172.28.24.10/bhabhabha -H "Host: something.com" HTTP/1.0 302 Found Location: https://something.com/bhabhabha Server: BigIP Connection: Keep-Alive Content-Length: 0 - Ahmad_03_151082Jun 10, 2015
Nimbostratus
on http VS iam using when HTTP_REQUEST { if {!( ([HTTP::uri] contains "WebServiceVehicleRegistration") or ([HTTP::uri] contains "InsuranceDetailsUploadWS") )} { HTTP::redirect https://[HTTP::host][HTTP::uri] return } } can i add the exclude for anything.com here? - nitassJun 10, 2015
Employee
e.g. when HTTP_REQUEST { if { [HTTP::host] equals "anything.com" } { return } if { !( ([HTTP::uri] contains "WebServiceVehicleRegistration") or ([HTTP::uri] contains "InsuranceDetailsUploadWS") ) } { HTTP::redirect "https://[HTTP::host][HTTP::uri]" return } } - Ahmad_03_151082Jun 10, 2015
Nimbostratus
Thank you so much it is working but what if i need to exclude another virtual portal like x.com and y.com how thw iRule will be? - nitassJun 10, 2015
Employee
e.g. when HTTP_REQUEST { switch [HTTP::host] { "anything.com" - "x.com" - "y.com" { return } } if { !( ([HTTP::uri] contains "WebServiceVehicleRegistration") or ([HTTP::uri] contains "InsuranceDetailsUploadWS") ) } { HTTP::redirect "https://[HTTP::host][HTTP::uri]" return } }
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