Forum Discussion
Ahmad_03_151082
Jun 10, 2015Nimbostratus
exclude 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_89166
Jun 10, 2015Noctilucent
is anything.com http or https?
if https, do you have anything.com certificate and private key?
- Ahmad_03_151082Jun 10, 2015Nimbostratusit is http but now it is working as https
- nitass_89166Jun 10, 2015Noctilucentyou 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, 2015Nimbostratusyes . something.com is a portal and anything.com is virtual portal
- nitass_89166Jun 10, 2015Noctilucentso, 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, 2015Nimbostratusexactly
- nitass_89166Jun 10, 2015Noctilucente.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, 2015Nimbostratuson 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?
- nitass_89166Jun 10, 2015Noctilucente.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, 2015NimbostratusThank 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?
- nitass_89166Jun 10, 2015Noctilucente.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 } }
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