Mantis - Resin
Viewing Issue Advanced Details
3096 minor always 11-24-08 14:30 03-18-09 15:52
ferg  
ferg  
urgent  
closed 3.2.1  
fixed  
none    
none 4.0.0  
0003096: dynamic rewrite-dispatch
(rep by Leonid Geller)


Protocol://hostname:port/x/y.html [^]
                Always forwards to Protocol://hostname:port/y.html [^]
                Unless x matches a specified regex.
 
Where x and y.html are not known until runtime, and both could be empty.
 
It is easy to do the above if x is known in advance, e.g. <forward regexp="^/x" target="/" />
But I cannot figure out how to do this dynamically, so, except for a short list of ?folders? (really servlet mappings), all requests redirect to the root app.
 
Example 1:
http://hostname.com:88/somefolder [^] and http://hostname.com:88/somefolder/index.html [^]
should load http://hostname.com:88/index.html [^]
 
Example 2:
http://hostname.com:88/foo.html [^] and http://hostname.com:88/somefolder/foo.html [^]
should load the same page: http://hostname.com:88/foo.html [^]
 
Example 3:
http://hostname.com:88/special/foo.html [^]
should go to /special/foo.html because ?/special? is in the exceptions regex.
 
 

Notes
(0003899)
ferg   
03-18-09 15:52   
server/1kt0