Forum Moderators: phranque

Message Too Old, No Replies

Problem redirecto http -> https

         

vigaros

9:41 am on Oct 4, 2010 (gmt 0)

10+ Year Member



hello,
I have the following problem and would need some help.
I'm trying to pass the following address to https.

UR1.- (http://medusa2:90/servlet/ContentServer?pagename=OpenMarket/Xcelerate/UIFramework/LoginPage&inifile=futuretense.ini

ULR2.- (http://medusa2/servlet/ContentServer?pagename=OpenMarket/Xcelerate/UIFramework/LoginPage&inifile=futuretense.ini)

My problem is that redirects both redirected me to the same place.

In the httpd.conf file set up these rules in the 2 VirtualHost

configuration within VirtualHost *:80

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) [%{HTTP_HOST}...] [L,R]


and configuration within VirtualHost *:90

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) [%{HTTP_HOST}...] [L,R]


Can someone help me? If necessary, I can put the settings I have available in httpd.conf/ssl.conf

phranque

10:50 am on Oct 4, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], vigaros!

what does the redirected url look like?

vigaros

12:31 pm on Oct 4, 2010 (gmt 0)

10+ Year Member




url1 : http://medusa2/servlet/ContentServer?pagename=OpenMarket/Xcelerate/UIFramework/LoginPage&inifile=futuretense.ini
To
[medusa2...]

url2 : http://medusa2:90/servlet/ContentServer?pagename=OpenMarket/Xcelerate/UIFramework/LoginPage&inifile=futuretense.ini
To
[medusa2...]

[edited by: jdMorgan at 1:58 pm (utc) on Oct 4, 2010]
[edit reason] Disabled automatic URL linking/hiding by forum software [/edit]

jdMorgan

2:02 pm on Oct 4, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you only want to redirect that specific URL with that specific query-string attached, then you must test the URL and the query-string.

Example:

RewriteCond %{SERVER_PORT} !=443
RewriteCond %{QUERY_STRING} ="pagename=OpenMarket/Xcelerate/UIFramework/LoginPage&inifile=futuretense.ini"
RewriteRule ^/(medusa2/servlet/ContentServer)$ https://%{HTTP_HOST}/$1 [L,R]

As both rewriteconds are looking for exact matches, I used the more-efficient "exact string match" operator in both cases.

Jim