Mantis - Resin
Viewing Issue Advanced Details
85 minor always 04-07-05 00:00 03-29-06 10:54
user91  
 
normal  
closed  
3.0.12 fixed  
none    
none 3.0.19  
0000085: rewrite-dispatch redirect does not support host
RSN-76
We want to be able to redirect based on the host
portion of a URL. Essentially, we want each web-app
to only serve requests for fully specified URLs to the
primary host address. All of the aliases should be
redirected to the primary host address. We need to
preserve the path portion of the request in the
redirect. Consequently, we want to use the
rewrite-dispatch tag.

Here are some examples of rewrite rules that we have
tried, but none of them seem to have any effect:

   <rewrite-dispatch>
      <redirect regexp='test.foo.com(.*$)'
target='http://client.foo.com$1'/> [^]
   </rewrite-dispatch>

This should redirect all requests against the
test.foo.com host to the client.foo.com host and
preserve any URL path and search arguments.
Unfortunately, this rule does not seem to ever
trigger.

This rule, however does:

   <rewrite-dispatch>
      <redirect regexp='^/index.html'
target='http://client.foo.com'/> [^]
   </rewrite-dispatch>

This indicates that the host portion of the request is
not available for the regular expression evaluation.

Where should we place our rewrite-dispatch stanzas in
the resin.conf file so that the host portion of the
request is available?
RedHat Enterprise 3
IBM JDK 1.4.2

Notes
(0000090)
ferg   
04-07-05 00:00   
Dispatching based on the host is not yet supported.
(0000958)
ferg   
03-29-06 10:54   
server13sg