Mantis - Resin
Viewing Issue Advanced Details
1251 minor always 07-14-06 14:04 07-17-06 10:53
ferg  
ferg  
normal  
closed  
fixed  
none    
none 3.0.20  
0001251: rewrite-dispatch
(rep by Jill Wetzler)

I do want to find out if it is possible to match an address whether it is in http or https with only one rewrite tag however. Our pages are accessible either securely or non-securely, and thus we want to be able to have our redirects handle both protocols, hopefully without having to duplicate every rewrite-dispatch in our ever-growing conf file.
 
This is the tag that I have:
<rewrite-dispatch>
    <redirect regexp='http(s?)://foo-localhost:8081/officetoolkit$'
             target='http$1://localhost:8081/us/developer/projects_toolkits.jsp#OfficeToolkit'/>
</rewrite-dispatch>
 
In theory, this should work. And it does work perfectly for http. For https, I believe that it is correctly matching on the regexp (because if it wasn’t, I probably wouldn’t be getting any errors at all). But I get a message from the InvocationDecoder saying “The URL contains escaped bytes unsupported by the UTF-8 encoding.” Is there a way around this that you can think of? Anything at all that we can do to prevent us from duplicating all of our tags would be fantastic.
 
Also, do you know where I should be breaking in your code to look at what my target url actually looks like? I thought this was handled in the RewriteFilter, so I set a few breakpoints in there, but never stopped on them. InvocationDecoder is handling the rawUri which is out of my league. Where would you suggest I start troubleshooting?

Notes
(0001403)
ferg   
07-17-06 10:53   
server/13sl