Rewrite rule changes browser's URL? Rule help please...

Topics: User Forum
Feb 25, 2009 at 5:19 PM
Edited Feb 26, 2009 at 3:58 PM
I have one virtual IIS website (SSL with wildcard certificate) which I am sharing between multiple organizations.  I want the host name to be used to determine what folder the content comes from, so here are some examples.  I was going to use URL Rewriting to solve this one, but my rules aren't behaving as expected.  The entire site is SSL.  Here is what I am looking for:

Example Client URL =>  Type  => Resulting URL
======================================
http://anything.applyto.org => Redirect => https://anything.applyto.org (Rule1: HTTP to HTTPS)
https://www.anything.applyto.org => Redirect => https://anything.applyto.org (Rule2: Strip 'WWW.')
https://anything1.applyto.org => Rewrite => https://anything1.applyto.org/anything1.applyto.org/ (Rule3: Embed hostname in path)
https://anything2.applyto.org => Rewrite => https://anything2.applyto.org/anything2.applyto.org/ (Rule3: Embed hostname in path)
https://anything2.applyto.org/123 => Rewrite => https://anything2.applyto.org/anything2.applyto.org/123 (Rule3: Embed hostname in path)
https://anything2.applyto.org/123/abc.htm => Rewrite => https://anything2.applyto.org/anything2.applyto.org/123/abc.htm (Rule3: Embed hostname in path)

What it is doing:
======================================
It seems like most everything is working correctly, but for some reason when I go to 'http://example.applyto.org/123' (note the lack of a trailing /) the client browser URL bar updates to 'http://example.applyto.org/example.applyto.org/123/', which I was hoping to never show the client, and the page does not display properly.  If the client instead requests 'http://example.applyto.org/123/' (with the trailing slash), the client URL bar stays the same, and the proper page displays.  I guess I don't understand why the clients URL bar would update at all on a rewrite rule? Is there some way to stop that from happening?

The rules: 
======================================
RewriteLog c:\temp\iirfLog.out
RewriteLogLevel 5

#=====================================================
#
# This should redirect all non SSL connections to the same path on the same server
# using HTTPS.
#
#=====================================================

RewriteCond %{HTTPS} ^off$ [I]
RedirectRule ^/(.*)$ https://%{HTTP_HOST}/$1 [R=301]

#=====================================================
#
# Redirect user from www.example.applyto.org to example.applyto.org
#
# If a user comes to this site with a www. prepending the host name,
# this will silently redirect the user to the same domain
# without the www.
#
#=====================================================

RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP_HOST} ^(www\.)(.+)$
RedirectRule (.*) https://%2$1 [R=301]

#=====================================================
#
# Add Hostname to beginning of the url requested
#
# would make: http://example.applyto.org/get/123.php
# into this : http://example.applyto.org/example.applyto.org/get/123.php
#
#=====================================================

RewriteCond %{HTTP_URL} ^/(?!%{HTTP_HOST}/)(.*) [I]
RewriteRule ^/(.*)$ /%{HTTP_HOST}/$1 [L]

The Log
======================================
I collected a log with two server requests, the first request to 'https://example.applyto.org/123', and the second to 'https://example.applyto.org/123/'.  The first one returned a 404 error for the client (with the client's URL bar changing to 'https://example.applyto.org/example.applyto.org/123/'), and the second serving up the proper page. 
--------------------------------------------
Wed Feb 25 11:01:53 - 6068 - ReadConfig: setting LogLevel to 5
Wed Feb 25 11:01:53 - 6068 - ReadConfig: line 11: RewriteCond %{HTTPS} ^off$
Wed Feb 25 11:01:53 - 6068 - ParseCondModifierFlags: '[I]'
Wed Feb 25 11:01:53 - 6068 - ParseCondModifierFlags: token 'I'
Wed Feb 25 11:01:53 - 6068 - Cond: Case Insensitive match
Wed Feb 25 11:01:53 - 6068 - ReadConfig: line 12: RedirectRule (rule 1) '^/(.*)$' 'https://%{HTTP_HOST}/$1' [R=301]
Wed Feb 25 11:01:53 - 6068 - ReadConfig: not a duplicate rule...
Wed Feb 25 11:01:53 - 6068 - ParseRuleModifierFlags: '[R=301]'
Wed Feb 25 11:01:53 - 6068 - ParseRuleModifierFlags: token 'R=301'
Wed Feb 25 11:01:53 - 6068 - ReadConfig: line 24: RewriteCond %{HTTPS} (on)?
Wed Feb 25 11:01:53 - 6068 - ReadConfig: line 25: RewriteCond %{HTTP_HOST} ^(www\.)(.+)$
Wed Feb 25 11:01:53 - 6068 - ReadConfig: line 26: RedirectRule (rule 2) '(.*)' 'https://%2$1' [R=301]
Wed Feb 25 11:01:53 - 6068 - ReadConfig: not a duplicate rule...
Wed Feb 25 11:01:53 - 6068 - ParseRuleModifierFlags: '[R=301]'
Wed Feb 25 11:01:53 - 6068 - ParseRuleModifierFlags: token 'R=301'
Wed Feb 25 11:01:53 - 6068 - ReadConfig: line 37: RewriteCond %{HTTP_URL} ^/(?!%{HTTP_HOST}/)(.*)
Wed Feb 25 11:01:53 - 6068 - ParseCondModifierFlags: '[I]'
Wed Feb 25 11:01:53 - 6068 - ParseCondModifierFlags: token 'I'
Wed Feb 25 11:01:53 - 6068 - Cond: Case Insensitive match
Wed Feb 25 11:01:53 - 6068 - ReadConfig: line 38: RewriteRule (rule 3) '^/(.*)$' '/%{HTTP_HOST}/$1' [L]
Wed Feb 25 11:01:53 - 6068 - ReadConfig: not a duplicate rule...
Wed Feb 25 11:01:53 - 6068 - ParseRuleModifierFlags: '[L]'
Wed Feb 25 11:01:53 - 6068 - ParseRuleModifierFlags: token 'L'
Wed Feb 25 11:01:53 - 6068 - rule: Last
Wed Feb 25 11:01:53 - 6068 - ReadConfig: Done reading, found 3 rules (0 errors, 0 warnings) on 39 lines

--------------------------------------------
Wed Feb 25 11:01:53 - 6068 - Initialize: Ionic ISAPI Rewriting Filter (IIRF) v1.2.15 final R3
Wed Feb 25 11:01:53 - 6068 - Initialize: config file 'C:\WINDOWS\system32\inetsrv\IIRF\ApplytoOrg\IsapiRewrite4.ini'
Wed Feb 25 11:01:53 - 6068 - Initialize: File watcher thread created.
Wed Feb 25 11:01:53 - 5388 - FileChangeWatcher(): Enter
Wed Feb 25 11:01:53 - 6068 - GetFilterVersion
Wed Feb 25 11:01:53 - 5388 - FileChangeWatcher: Await()...
Wed Feb 25 11:01:53 - 5388 - AwaitIniChangeAndReinit()...
Wed Feb 25 11:01:53 - 6068 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Feb 25 11:01:53 - 6068 - OnUrlMap: storing physical path (D:\Inetpub\applytoroot\123), in ptr (0x000d7540)
Wed Feb 25 11:01:53 - 6068 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Wed Feb 25 11:01:53 - 6068 - DoRewrites
Wed Feb 25 11:01:53 - 6068 - GetServerVariable_AutoFree: getting 'url'
Wed Feb 25 11:01:53 - 6068 - GetServerVariable_AutoFree - no joy (GetLastError()=1413)
Wed Feb 25 11:01:53 - 6068 - GetServerVariable_AutoFree: 128 bytes
Wed Feb 25 11:01:53 - 6068 - GetServerVariable_AutoFree: result ''
Wed Feb 25 11:01:53 - 6068 - GetHeader_AutoFree: getting 'url'
Wed Feb 25 11:01:53 - 6068 - GetHeader_AutoFree: 5 bytes, result '/123'
Wed Feb 25 11:01:53 - 6068 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Wed Feb 25 11:01:53 - 6068 - GetServerVariable_AutoFree: 1 bytes
Wed Feb 25 11:01:53 - 6068 - GetServerVariable_AutoFree: result ''
Wed Feb 25 11:01:53 - 6068 - GetHeader_AutoFree: getting 'method'
Wed Feb 25 11:01:53 - 6068 - GetHeader_AutoFree: 4 bytes, result 'GET'
Wed Feb 25 11:01:53 - 6068 - DoRewrites: New Url: '/123'
Wed Feb 25 11:01:53 - 6068 - EvaluateRules: depth=0
Wed Feb 25 11:01:53 - 6068 - EvaluateRules: Rule 1 : 2 matches
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: getting 'HTTPS'
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: 3 bytes
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: result 'on'
Wed Feb 25 11:01:53 - 6068 - ReplaceServerVariables: VariableName='HTTPS' Value='on'
Wed Feb 25 11:01:53 - 6068 - ReplaceServerVariables: InputString='%{HTTPS}' out='on'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: ts1 'on'
Wed Feb 25 11:01:53 - 6068 - GenerateReplacementString: src='/123','(null)' ReplacePattern='on' vec=[[ [ 0, 4, 1, 4] [] ] counts=2,0
Wed Feb 25 11:01:53 - 6068 - ApplyCaseConversion: before 'on'
Wed Feb 25 11:01:53 - 6068 - ApplyCaseConversion: after 'on'
Wed Feb 25 11:01:53 - 6068 - GenerateReplacementString: result 'on'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: checking 'on' against pattern '^off$'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: match result: -1 (No match)
Wed Feb 25 11:01:53 - 6068 - EvaluateCondition: Child is NULL
Wed Feb 25 11:01:53 - 6068 - EvalCondition: returning FALSE
Wed Feb 25 11:01:53 - 6068 - EvalConditionList: rule 1, FALSE, Rule does not apply
Wed Feb 25 11:01:53 - 6068 - EvaluateRules: Rule 2 : 2 matches
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: getting 'HTTPS'
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: 3 bytes
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: result 'on'
Wed Feb 25 11:01:53 - 6068 - ReplaceServerVariables: VariableName='HTTPS' Value='on'
Wed Feb 25 11:01:53 - 6068 - ReplaceServerVariables: InputString='%{HTTPS}' out='on'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: ts1 'on'
Wed Feb 25 11:01:53 - 6068 - GenerateReplacementString: src='/123','(null)' ReplacePattern='on' vec=[[ [ 0, 4, 0, 4] [] ] counts=2,0
Wed Feb 25 11:01:53 - 6068 - ApplyCaseConversion: before 'on'
Wed Feb 25 11:01:53 - 6068 - ApplyCaseConversion: after 'on'
Wed Feb 25 11:01:53 - 6068 - GenerateReplacementString: result 'on'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: checking 'on' against pattern '(on)?'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: match result: 2 (match)
Wed Feb 25 11:01:53 - 6068 - EvalCondition: Child is non NULL (parent= 0x02872630) (child= 0x028767A8)
Wed Feb 25 11:01:53 - 6068 - EvalCondition: Current condition evaluates to TRUE
Wed Feb 25 11:01:53 - 6068 - EvalCondition: Logical AND, ergo we evaluate the Child
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: getting 'HTTP_HOST'
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: 20 bytes
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: result 'example.applyto.org'
Wed Feb 25 11:01:53 - 6068 - ReplaceServerVariables: VariableName='HTTP_HOST' Value='example.applyto.org'
Wed Feb 25 11:01:53 - 6068 - ReplaceServerVariables: InputString='%{HTTP_HOST}' out='example.applyto.org'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: ts1 'example.applyto.org'
Wed Feb 25 11:01:53 - 6068 - GenerateReplacementString: src='/123','on' ReplacePattern='example.applyto.org' vec=[[ [ 0, 4, 0, 4] [ 0, 2, 0, 2] ] counts=2,2
Wed Feb 25 11:01:53 - 6068 - ApplyCaseConversion: before 'example.applyto.org'
Wed Feb 25 11:01:53 - 6068 - ApplyCaseConversion: after 'example.applyto.org'
Wed Feb 25 11:01:53 - 6068 - GenerateReplacementString: result 'example.applyto.org'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: checking 'example.applyto.org' against pattern '^(www\.)(.+)$'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: match result: -1 (No match)
Wed Feb 25 11:01:53 - 6068 - EvaluateCondition: Child is NULL
Wed Feb 25 11:01:53 - 6068 - EvalCondition: returning FALSE
Wed Feb 25 11:01:53 - 6068 - EvalCondition: returning FALSE
Wed Feb 25 11:01:53 - 6068 - EvalConditionList: rule 2, FALSE, Rule does not apply
Wed Feb 25 11:01:53 - 6068 - EvaluateRules: Rule 3 : 2 matches
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: getting 'HTTP_URL'
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: 5 bytes
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: result '/123'
Wed Feb 25 11:01:53 - 6068 - ReplaceServerVariables: VariableName='HTTP_URL' Value='/123'
Wed Feb 25 11:01:53 - 6068 - ReplaceServerVariables: InputString='%{HTTP_URL}' out='/123'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: ts1 '/123'
Wed Feb 25 11:01:53 - 6068 - GenerateReplacementString: src='/123','(null)' ReplacePattern='/123' vec=[[ [ 0, 4, 1, 4] [] ] counts=2,0
Wed Feb 25 11:01:53 - 6068 - ApplyCaseConversion: before '/123'
Wed Feb 25 11:01:53 - 6068 - ApplyCaseConversion: after '/123'
Wed Feb 25 11:01:53 - 6068 - GenerateReplacementString: result '/123'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: checking '/123' against pattern '^/(?!%{HTTP_HOST}/)(.*)'
Wed Feb 25 11:01:53 - 6068 - EvalCondition: match result: 2 (match)
Wed Feb 25 11:01:53 - 6068 - EvaluateCondition: Child is NULL
Wed Feb 25 11:01:53 - 6068 - EvalCondition: returning TRUE
Wed Feb 25 11:01:53 - 6068 - EvalConditionList: rule 3, TRUE, Rule will apply
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: getting 'HTTP_HOST'
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: 20 bytes
Wed Feb 25 11:01:53 - 6068 - GetServerVariable: result 'example.applyto.org'
Wed Feb 25 11:01:53 - 6068 - ReplaceServerVariables: VariableName='HTTP_HOST' Value='example.applyto.org'
Wed Feb 25 11:01:53 - 6068 - ReplaceServerVariables: InputString='/%{HTTP_HOST}/$1' out='/example.applyto.org/$1'
Wed Feb 25 11:01:53 - 6068 - GenerateReplacementString: src='/123','/123' ReplacePattern='/example.applyto.org/$1' vec=[[ [ 0, 4, 1, 4] [ 0, 4, 1, 4] ] counts=2,2
Wed Feb 25 11:01:53 - 6068 - GenerateReplacementString: replacing ($1) with '123'
Wed Feb 25 11:01:53 - 6068 - ApplyCaseConversion: before '/example.applyto.org/123'
Wed Feb 25 11:01:53 - 6068 - ApplyCaseConversion: after '/example.applyto.org/123'
Wed Feb 25 11:01:53 - 6068 - GenerateReplacementString: result '/example.applyto.org/123'
Wed Feb 25 11:01:53 - 6068 - EvaluateRules: Result (length 24): /example.applyto.org/123
Wed Feb 25 11:01:53 - 6068 - EvaluateRules: Last Rule
Wed Feb 25 11:01:53 - 6068 - EvaluateRules: returning 1
Wed Feb 25 11:01:53 - 6068 - DoRewrites: Rewrite Url to: '/example.applyto.org/123'
Wed Feb 25 11:01:53 - 6068 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Feb 25 11:01:53 - 6068 - OnUrlMap: storing physical path (D:\Inetpub\applytoroot\example.applyto.org\123), in ptr (0x000d5168)
Wed Feb 25 11:01:53 - 3944 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Feb 25 11:01:53 - 3944 - OnUrlMap: storing physical path (D:\Inetpub\applytoroot\example.applyto.org\123\), in ptr (0x000d5900)
Wed Feb 25 11:01:53 - 3944 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Wed Feb 25 11:01:53 - 3944 - DoRewrites
Wed Feb 25 11:01:53 - 3944 - GetServerVariable_AutoFree: getting 'url'
Wed Feb 25 11:01:53 - 3944 - GetServerVariable_AutoFree - no joy (GetLastError()=1413)
Wed Feb 25 11:01:53 - 3944 - GetServerVariable_AutoFree: 128 bytes
Wed Feb 25 11:01:53 - 3944 - GetServerVariable_AutoFree: result ''
Wed Feb 25 11:01:53 - 3944 - GetHeader_AutoFree: getting 'url'
Wed Feb 25 11:01:53 - 3944 - GetHeader_AutoFree: 26 bytes, result '/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Wed Feb 25 11:01:53 - 3944 - GetServerVariable_AutoFree: 1 bytes
Wed Feb 25 11:01:53 - 3944 - GetServerVariable_AutoFree: result ''
Wed Feb 25 11:01:53 - 3944 - GetHeader_AutoFree: getting 'method'
Wed Feb 25 11:01:53 - 3944 - GetHeader_AutoFree: 4 bytes, result 'GET'
Wed Feb 25 11:01:53 - 3944 - DoRewrites: New Url: '/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - EvaluateRules: depth=0
Wed Feb 25 11:01:53 - 3944 - EvaluateRules: Rule 1 : 2 matches
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: getting 'HTTPS'
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: 3 bytes
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: result 'on'
Wed Feb 25 11:01:53 - 3944 - ReplaceServerVariables: VariableName='HTTPS' Value='on'
Wed Feb 25 11:01:53 - 3944 - ReplaceServerVariables: InputString='%{HTTPS}' out='on'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: ts1 'on'
Wed Feb 25 11:01:53 - 3944 - GenerateReplacementString: src='/example.applyto.org/123/','(null)' ReplacePattern='on' vec=[[ [ 0, 25, 1, 25] [] ] counts=2,0
Wed Feb 25 11:01:53 - 3944 - ApplyCaseConversion: before 'on'
Wed Feb 25 11:01:53 - 3944 - ApplyCaseConversion: after 'on'
Wed Feb 25 11:01:53 - 3944 - GenerateReplacementString: result 'on'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: checking 'on' against pattern '^off$'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: match result: -1 (No match)
Wed Feb 25 11:01:53 - 3944 - EvaluateCondition: Child is NULL
Wed Feb 25 11:01:53 - 3944 - EvalCondition: returning FALSE
Wed Feb 25 11:01:53 - 3944 - EvalConditionList: rule 1, FALSE, Rule does not apply
Wed Feb 25 11:01:53 - 3944 - EvaluateRules: Rule 2 : 2 matches
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: getting 'HTTPS'
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: 3 bytes
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: result 'on'
Wed Feb 25 11:01:53 - 3944 - ReplaceServerVariables: VariableName='HTTPS' Value='on'
Wed Feb 25 11:01:53 - 3944 - ReplaceServerVariables: InputString='%{HTTPS}' out='on'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: ts1 'on'
Wed Feb 25 11:01:53 - 3944 - GenerateReplacementString: src='/example.applyto.org/123/','(null)' ReplacePattern='on' vec=[[ [ 0, 25, 0, 25] [] ] counts=2,0
Wed Feb 25 11:01:53 - 3944 - ApplyCaseConversion: before 'on'
Wed Feb 25 11:01:53 - 3944 - ApplyCaseConversion: after 'on'
Wed Feb 25 11:01:53 - 3944 - GenerateReplacementString: result 'on'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: checking 'on' against pattern '(on)?'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: match result: 2 (match)
Wed Feb 25 11:01:53 - 3944 - EvalCondition: Child is non NULL (parent= 0x02872630) (child= 0x028767A8)
Wed Feb 25 11:01:53 - 3944 - EvalCondition: Current condition evaluates to TRUE
Wed Feb 25 11:01:53 - 3944 - EvalCondition: Logical AND, ergo we evaluate the Child
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: getting 'HTTP_HOST'
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: 20 bytes
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: result 'example.applyto.org'
Wed Feb 25 11:01:53 - 3944 - ReplaceServerVariables: VariableName='HTTP_HOST' Value='example.applyto.org'
Wed Feb 25 11:01:53 - 3944 - ReplaceServerVariables: InputString='%{HTTP_HOST}' out='example.applyto.org'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: ts1 'example.applyto.org'
Wed Feb 25 11:01:53 - 3944 - GenerateReplacementString: src='/example.applyto.org/123/','on' ReplacePattern='example.applyto.org' vec=[[ [ 0, 25, 0, 25] [ 0, 2, 0, 2] ] counts=2,2
Wed Feb 25 11:01:53 - 3944 - ApplyCaseConversion: before 'example.applyto.org'
Wed Feb 25 11:01:53 - 3944 - ApplyCaseConversion: after 'example.applyto.org'
Wed Feb 25 11:01:53 - 3944 - GenerateReplacementString: result 'example.applyto.org'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: checking 'example.applyto.org' against pattern '^(www\.)(.+)$'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: match result: -1 (No match)
Wed Feb 25 11:01:53 - 3944 - EvaluateCondition: Child is NULL
Wed Feb 25 11:01:53 - 3944 - EvalCondition: returning FALSE
Wed Feb 25 11:01:53 - 3944 - EvalCondition: returning FALSE
Wed Feb 25 11:01:53 - 3944 - EvalConditionList: rule 2, FALSE, Rule does not apply
Wed Feb 25 11:01:53 - 3944 - EvaluateRules: Rule 3 : 2 matches
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: getting 'HTTP_URL'
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: 26 bytes
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: result '/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - ReplaceServerVariables: VariableName='HTTP_URL' Value='/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - ReplaceServerVariables: InputString='%{HTTP_URL}' out='/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: ts1 '/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - GenerateReplacementString: src='/example.applyto.org/123/','(null)' ReplacePattern='/example.applyto.org/123/' vec=[[ [ 0, 25, 1, 25] [] ] counts=2,0
Wed Feb 25 11:01:53 - 3944 - ApplyCaseConversion: before '/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - ApplyCaseConversion: after '/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - GenerateReplacementString: result '/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: checking '/example.applyto.org/123/' against pattern '^/(?!%{HTTP_HOST}/)(.*)'
Wed Feb 25 11:01:53 - 3944 - EvalCondition: match result: 2 (match)
Wed Feb 25 11:01:53 - 3944 - EvaluateCondition: Child is NULL
Wed Feb 25 11:01:53 - 3944 - EvalCondition: returning TRUE
Wed Feb 25 11:01:53 - 3944 - EvalConditionList: rule 3, TRUE, Rule will apply
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: getting 'HTTP_HOST'
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: 20 bytes
Wed Feb 25 11:01:53 - 3944 - GetServerVariable: result 'example.applyto.org'
Wed Feb 25 11:01:53 - 3944 - ReplaceServerVariables: VariableName='HTTP_HOST' Value='example.applyto.org'
Wed Feb 25 11:01:53 - 3944 - ReplaceServerVariables: InputString='/%{HTTP_HOST}/$1' out='/example.applyto.org/$1'
Wed Feb 25 11:01:53 - 3944 - GenerateReplacementString: src='/example.applyto.org/123/','/example.applyto.org/123/' ReplacePattern='/example.applyto.org/$1' vec=[[ [ 0, 25, 1, 25] [ 0, 25, 1, 25] ] counts=2,2
Wed Feb 25 11:01:53 - 3944 - GenerateReplacementString: replacing ($1) with 'example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - ApplyCaseConversion: before '/example.applyto.org/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - ApplyCaseConversion: after '/example.applyto.org/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - GenerateReplacementString: result '/example.applyto.org/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - EvaluateRules: Result (length 45): /example.applyto.org/example.applyto.org/123/
Wed Feb 25 11:01:53 - 3944 - EvaluateRules: Last Rule
Wed Feb 25 11:01:53 - 3944 - EvaluateRules: returning 1
Wed Feb 25 11:01:53 - 3944 - DoRewrites: Rewrite Url to: '/example.applyto.org/example.applyto.org/123/'
Wed Feb 25 11:01:53 - 3944 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Feb 25 11:01:53 - 3944 - OnUrlMap: storing physical path (D:\Inetpub\applytoroot\example.applyto.org\example.applyto.org\123\), in ptr (0x000d7410)
Wed Feb 25 11:02:00 - 3944 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Feb 25 11:02:00 - 3944 - OnUrlMap: storing physical path (D:\Inetpub\applytoroot\123\), in ptr (0x000d7410)
Wed Feb 25 11:02:00 - 3944 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Wed Feb 25 11:02:00 - 3944 - DoRewrites
Wed Feb 25 11:02:00 - 3944 - GetServerVariable_AutoFree: getting 'url'
Wed Feb 25 11:02:00 - 3944 - GetServerVariable_AutoFree - no joy (GetLastError()=1413)
Wed Feb 25 11:02:00 - 3944 - GetServerVariable_AutoFree: 128 bytes
Wed Feb 25 11:02:00 - 3944 - GetServerVariable_AutoFree: result ''
Wed Feb 25 11:02:00 - 3944 - GetHeader_AutoFree: getting 'url'
Wed Feb 25 11:02:00 - 3944 - GetHeader_AutoFree: 6 bytes, result '/123/'
Wed Feb 25 11:02:00 - 3944 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Wed Feb 25 11:02:00 - 3944 - GetServerVariable_AutoFree: 1 bytes
Wed Feb 25 11:02:00 - 3944 - GetServerVariable_AutoFree: result ''
Wed Feb 25 11:02:00 - 3944 - GetHeader_AutoFree: getting 'method'
Wed Feb 25 11:02:00 - 3944 - GetHeader_AutoFree: 4 bytes, result 'GET'
Wed Feb 25 11:02:00 - 3944 - DoRewrites: New Url: '/123/'
Wed Feb 25 11:02:00 - 3944 - EvaluateRules: depth=0
Wed Feb 25 11:02:00 - 3944 - EvaluateRules: Rule 1 : 2 matches
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: getting 'HTTPS'
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: 3 bytes
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: result 'on'
Wed Feb 25 11:02:00 - 3944 - ReplaceServerVariables: VariableName='HTTPS' Value='on'
Wed Feb 25 11:02:00 - 3944 - ReplaceServerVariables: InputString='%{HTTPS}' out='on'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: ts1 'on'
Wed Feb 25 11:02:00 - 3944 - GenerateReplacementString: src='/123/','(null)' ReplacePattern='on' vec=[[ [ 0, 5, 1, 5] [] ] counts=2,0
Wed Feb 25 11:02:00 - 3944 - ApplyCaseConversion: before 'on'
Wed Feb 25 11:02:00 - 3944 - ApplyCaseConversion: after 'on'
Wed Feb 25 11:02:00 - 3944 - GenerateReplacementString: result 'on'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: checking 'on' against pattern '^off$'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: match result: -1 (No match)
Wed Feb 25 11:02:00 - 3944 - EvaluateCondition: Child is NULL
Wed Feb 25 11:02:00 - 3944 - EvalCondition: returning FALSE
Wed Feb 25 11:02:00 - 3944 - EvalConditionList: rule 1, FALSE, Rule does not apply
Wed Feb 25 11:02:00 - 3944 - EvaluateRules: Rule 2 : 2 matches
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: getting 'HTTPS'
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: 3 bytes
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: result 'on'
Wed Feb 25 11:02:00 - 3944 - ReplaceServerVariables: VariableName='HTTPS' Value='on'
Wed Feb 25 11:02:00 - 3944 - ReplaceServerVariables: InputString='%{HTTPS}' out='on'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: ts1 'on'
Wed Feb 25 11:02:00 - 3944 - GenerateReplacementString: src='/123/','(null)' ReplacePattern='on' vec=[[ [ 0, 5, 0, 5] [] ] counts=2,0
Wed Feb 25 11:02:00 - 3944 - ApplyCaseConversion: before 'on'
Wed Feb 25 11:02:00 - 3944 - ApplyCaseConversion: after 'on'
Wed Feb 25 11:02:00 - 3944 - GenerateReplacementString: result 'on'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: checking 'on' against pattern '(on)?'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: match result: 2 (match)
Wed Feb 25 11:02:00 - 3944 - EvalCondition: Child is non NULL (parent= 0x02872630) (child= 0x028767A8)
Wed Feb 25 11:02:00 - 3944 - EvalCondition: Current condition evaluates to TRUE
Wed Feb 25 11:02:00 - 3944 - EvalCondition: Logical AND, ergo we evaluate the Child
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: getting 'HTTP_HOST'
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: 20 bytes
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: result 'example.applyto.org'
Wed Feb 25 11:02:00 - 3944 - ReplaceServerVariables: VariableName='HTTP_HOST' Value='example.applyto.org'
Wed Feb 25 11:02:00 - 3944 - ReplaceServerVariables: InputString='%{HTTP_HOST}' out='example.applyto.org'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: ts1 'example.applyto.org'
Wed Feb 25 11:02:00 - 3944 - GenerateReplacementString: src='/123/','on' ReplacePattern='example.applyto.org' vec=[[ [ 0, 5, 0, 5] [ 0, 2, 0, 2] ] counts=2,2
Wed Feb 25 11:02:00 - 3944 - ApplyCaseConversion: before 'example.applyto.org'
Wed Feb 25 11:02:00 - 3944 - ApplyCaseConversion: after 'example.applyto.org'
Wed Feb 25 11:02:00 - 3944 - GenerateReplacementString: result 'example.applyto.org'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: checking 'example.applyto.org' against pattern '^(www\.)(.+)$'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: match result: -1 (No match)
Wed Feb 25 11:02:00 - 3944 - EvaluateCondition: Child is NULL
Wed Feb 25 11:02:00 - 3944 - EvalCondition: returning FALSE
Wed Feb 25 11:02:00 - 3944 - EvalCondition: returning FALSE
Wed Feb 25 11:02:00 - 3944 - EvalConditionList: rule 2, FALSE, Rule does not apply
Wed Feb 25 11:02:00 - 3944 - EvaluateRules: Rule 3 : 2 matches
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: getting 'HTTP_URL'
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: 6 bytes
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: result '/123/'
Wed Feb 25 11:02:00 - 3944 - ReplaceServerVariables: VariableName='HTTP_URL' Value='/123/'
Wed Feb 25 11:02:00 - 3944 - ReplaceServerVariables: InputString='%{HTTP_URL}' out='/123/'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: ts1 '/123/'
Wed Feb 25 11:02:00 - 3944 - GenerateReplacementString: src='/123/','(null)' ReplacePattern='/123/' vec=[[ [ 0, 5, 1, 5] [] ] counts=2,0
Wed Feb 25 11:02:00 - 3944 - ApplyCaseConversion: before '/123/'
Wed Feb 25 11:02:00 - 3944 - ApplyCaseConversion: after '/123/'
Wed Feb 25 11:02:00 - 3944 - GenerateReplacementString: result '/123/'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: checking '/123/' against pattern '^/(?!%{HTTP_HOST}/)(.*)'
Wed Feb 25 11:02:00 - 3944 - EvalCondition: match result: 2 (match)
Wed Feb 25 11:02:00 - 3944 - EvaluateCondition: Child is NULL
Wed Feb 25 11:02:00 - 3944 - EvalCondition: returning TRUE
Wed Feb 25 11:02:00 - 3944 - EvalConditionList: rule 3, TRUE, Rule will apply
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: getting 'HTTP_HOST'
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: 20 bytes
Wed Feb 25 11:02:00 - 3944 - GetServerVariable: result 'example.applyto.org'
Wed Feb 25 11:02:00 - 3944 - ReplaceServerVariables: VariableName='HTTP_HOST' Value='example.applyto.org'
Wed Feb 25 11:02:00 - 3944 - ReplaceServerVariables: InputString='/%{HTTP_HOST}/$1' out='/example.applyto.org/$1'
Wed Feb 25 11:02:00 - 3944 - GenerateReplacementString: src='/123/','/123/' ReplacePattern='/example.applyto.org/$1' vec=[[ [ 0, 5, 1, 5] [ 0, 5, 1, 5] ] counts=2,2
Wed Feb 25 11:02:00 - 3944 - GenerateReplacementString: replacing ($1) with '123/'
Wed Feb 25 11:02:00 - 3944 - ApplyCaseConversion: before '/example.applyto.org/123/'
Wed Feb 25 11:02:00 - 3944 - ApplyCaseConversion: after '/example.applyto.org/123/'
Wed Feb 25 11:02:00 - 3944 - GenerateReplacementString: result '/example.applyto.org/123/'
Wed Feb 25 11:02:00 - 3944 - EvaluateRules: Result (length 25): /example.applyto.org/123/
Wed Feb 25 11:02:00 - 3944 - EvaluateRules: Last Rule
Wed Feb 25 11:02:00 - 3944 - EvaluateRules: returning 1
Wed Feb 25 11:02:00 - 3944 - DoRewrites: Rewrite Url to: '/example.applyto.org/123/'
Wed Feb 25 11:02:00 - 3944 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Feb 25 11:02:00 - 3944 - OnUrlMap: storing physical path (D:\Inetpub\applytoroot\example.applyto.org\123\), in ptr (0x000d6f50)
Wed Feb 25 11:02:00 - 3944 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Feb 25 11:02:00 - 3944 - OnUrlMap: storing physical path (D:\Inetpub\applytoroot\example.applyto.org\123\index.php), in ptr (0x000cb9b8)
Wed Feb 25 11:02:00 - 3944 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Feb 25 11:02:00 - 3944 - HttpFilterProc: SF_NOTIFY_URL_MAP