redirect to ssl appends https://... to url

May 14, 2007 at 5:05 PM
Edited May 14, 2007 at 5:46 PM
I am trying to redirect a specific directory into SSL. It seems that as soon as I put https:// into my replacement string, I somehow change the replacement mode.

Relevant portion of ini file:
RewriteLogLevel 3
RewriteCond %{HTTP_HOST} ^www\.website\.com$
RewriteCond %{HTTPS} off
RewriteRule ^(/farcry/)(.*)$ https://12.129.107.100$1$2 R

This gives me the following redirect
Location: http://www.website.com:80https://12.129.107.100/farcry/

instead of
https://12.129.107.100/farcry/

Strangely enough, when I change the rule to

RewriteRule ^(/farcry/)(.*)$ http://12.129.107.100$1$2 R

then the url is correctly rewritten to
http://12.129.107.100/farcry/


Here is a log exceprt:
Mon May 14 12:00:55 2007 - New Url: '/farcry/'
Mon May 14 12:00:55 2007 - ApplyRules (depth=0)
Mon May 14 12:00:55 2007 - Rule 1 : -1 (No match)
Mon May 14 12:00:55 2007 - Rule 2 : 3 matches
Mon May 14 12:00:55 2007 - EvaluateCondition: checking 'www.website.com' against pattern '^www\.website\.com$'
Mon May 14 12:00:55 2007 - Cond : 1 (match)
Mon May 14 12:00:55 2007 - EvaluateCondition: checking 'off' against pattern 'off'
Mon May 14 12:00:55 2007 - Cond : 1 (match)
Mon May 14 12:00:55 2007 - EvaluateConditionList: TRUE, Rule will apply
Mon May 14 12:00:55 2007 - Result (length 30): https://12.129.107.100/farcry/
Mon May 14 12:00:55 2007 - ApplyRules: returning 302
Mon May 14 12:00:55 2007 - Redirect (code=302) Url to: 'https://12.129.107.100/farcry/'
Coordinator
Jun 13, 2007 at 1:23 AM
What version of IIRF are you using, please?