redirect port

This is a discussion on redirect port within the Modssl Users forums, part of the Web Server and Related Forums category; I have been using Apache/2.2.3 and Tomcat 5.5 as standalone servers. I'm adding ssl with ...


Go Back   Usenet Forums > Web Server and Related Forums > Modssl Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-17-2008
Tim Hester
 
Posts: n/a
Default redirect port

I have been using Apache/2.2.3 and Tomcat 5.5 as standalone servers. I'm
adding ssl with mod_jk and mod_proxy_ajp to access tomcat via ssl.

I access my static content and cgi via http://www.mydomain.com/ and use
mod_rewrite in .htaccess to redirect to https. This works fine as desired.

I can access my webapp via http://www.mydomain.com:8080/MyWebApp, and this
is the url users have book marked. This continues to work. I can also access
https://www.mydomain.com/MyWebApp.

What I'd like to do is force a redirect from
http://www.mydomain.com:8080/MyWebApp to https://www.mydomain.com/MyWebApp

Note; tomcat is not under the apache webroot

Any assistance appreciated.

Thanks

Tim

Reply With Quote
  #2 (permalink)  
Old 07-17-2008
Tim Hester
 
Posts: n/a
Default Re: redirect port

A few more hours of investigation revealed the solution;

RewriteCond %{HTTP_HOST} ^www.mydomain.com:8080 [NC]
RewriteRule ^/(.*) https://www.mydomain.com/$1 [L,R=301]

Sorry bout the html mail earlier.

Tim

----- Original Message -----
From: Tim Hester
To: modssl-users@modssl.org
Sent: Thursday, July 17, 2008 10:38 AM
Subject: redirect port


I have been using Apache/2.2.3 and Tomcat 5.5 as standalone servers. I'm
adding ssl with mod_jk and mod_proxy_ajp to access tomcat via ssl.

I access my static content and cgi via http://www.mydomain.com/ and use
mod_rewrite in .htaccess to redirect to https. This works fine as desired.

I can access my webapp via http://www.mydomain.com:8080/MyWebApp, and this
is the url users have book marked. This continues to work. I can also access
https://www.mydomain.com/MyWebApp.

What I'd like to do is force a redirect from
http://www.mydomain.com:8080/MyWebApp to https://www.mydomain.com/MyWebApp

Note; tomcat is not under the apache webroot

Any assistance appreciated.

Thanks

Tim

__________________________________________________ ____________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:20 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0