Forum Discussion
Robert_47833
Altostratus
Jun 07, 2011Do we have other way to forward https
Hi,need help
request: https://www.sr24stubtex.com/help/services/
want to forward to a pool cjj
becuase backend server only open http:80 as the service and the java code didn't accept two different domain
so it seems code below doesn't work.
if {$uri matches_regex "^/help/services/" }
{ HTTP::redirect "http://help.sr24.com[HTTP::uri]"
return
how can I achieve this, I want to change the port from 443 to 80 and forward to pool cjj
19 Replies
- nitass
Employee
i think u want rewriting rather than redirection. pls feel free to revise.
if {[HTTP::uri] starts_with "/help/services/"} {
HTTP::header replace "Host" "help.sr24.com"
} - richard_77048
Nimbostratus
Jucao,
Have you tried something like this:if {$uri matches_regex "^/help/services/" } { use pool cjj } else { use pool some_other_pool }
Your virtual server can pass decrypted SSL traffic onto port 80 on your backend webservers. You should be able to do this without redirecting users to HTTP.
Richard - Robert_47833
Altostratus
Hi,thanks
the request is https://www.sr24stubtex.com/help/services/ ,it will hit a server which has ssl server profile which means https443 will be sent to backend server.
the pool is cjj ,member is ip:80
I can't change the pool to ip:443 or change the ssl server profile to none
I only can achieve via irule.
I don't want to redirect because redirect will change the hostname ,I only want to forward it.
1:irule should tranfer https to http and without change the hostname
2:forward request to pool cjj whose member is ip:80 - John_Alam_45640Historic F5 Accountif {[HTTP::path $uri] starts_with "/help/services/" } {
SSL::disable
pool cjj
}
else {
pool some_other_pool
} - John_Alam_45640Historic F5 Accounthttp://devcentral.f5.com/wiki/default.aspx/iRules/SSL__disable.html
- Robert_47833
Altostratus
yes,sorry
I forget to say member is ip:0
so if only use ssl::disable,it will send to http443 ,do we have some feature to change it to 80 - John_Alam_45640Historic F5 Accountuse the node command:
if {[HTTP::path $uri] starts_with "/help/services/" } {
SSL::disable
node x.x.x.x 80
}
else {
pool some_other_pool
} - Robert_47833
Altostratus
oh,thanks ,
it will work,can we change the port of whole request to 80? - John_Alam_45640Historic F5 AccountNot without an HTTP::redirect.
- nitass
Employee
i'm not sure if i understand whole thing correctly.
it looks like help page is hosted on pool cjj which is http.
if so, why won't u create 2 virtuals; one is http and the other one is https, then redirect help request to the http one.
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
