Forum Discussion
Danielseyoum
Altostratus
May 14, 2007Redirecting from non standard port to https
I have a Virtual Server listening on port 55000 that I want to redirect to https:
Neither rules produced the intended result:
1.
rule redirect {
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
}
2.
rule redirect1 {
when HTTP_REQUEST {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
This what I see thru Http watcher:
StartTimeSizeMethodResultTypeURL
09:51:41.4370.030GET302Redirect to https://portal.sapinternal.net/http://portal.sapinternal.net:55000/
09:51:41.4672.0530GET302Redirect to https://portal.sapinternal.net:55000/index.htmlhttps://portal.sapinternal.net/
09:51:43.5200.040GET(Error 0x2f7d)*https://portal.sapinternal.net:55000/index.html
BTW: I am experiencing this issue using IE 6, but not with FireFox 2.0. Unfortunately the company standard is IE 6.
2 Replies
- Kenny_Van_73892
Nimbostratus
Try this
when HTTP_REQUEST {
if {[TCP::server_port] == 55000} {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
} - Danielseyoum
Altostratus
Here is the rule that finally got to work:
when HTTP_REQUEST {
log local0. "I got the request as: [HTTP::host] and [TCP::local_port]"
set message {SAP Portal
}
HTTP::respond 200 content [subst $message]
}
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
