Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Redirect from unsecure to secure URL

wgkorb-JavaNetApr 2 2010 — edited Apr 3 2010
I am running WS7u8. I have a virtual server that listens on both HTTP & HTTPS, and in both cases, can be on multiple server hostnames & IPs.

I have a couple of URIs on the server that should only be available via HTTPS. As such, I have added conditional redirection to the server's obj.conf to send redirects when requests for those URIs come in on a non-secured transport. Here's what I did:
<If $uri =~ '^(/adm/.*|/private/.*)' and not $security >
 NameTrans fn="redirect" url="https://$urlhost$uri" status="301"
</If>
This works exactly as I intend it to, except in one interesting instance: when the port that the secure listener is on is not the default 443. On my development instance, the secure server is listening on port 8443 instead of 443, and the above redirect rule results in a "Not Found" message in the client browser.

Is there any way to write the target url so that it includes the secure port number?

Thanks,
Bill
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2010
Added on Apr 2 2010
4 comments
522 views