Cheers, Irene Krist van Besien wrote:
On 3/5/07, Irene Hall <irenedhall@xxxxxxxxxxxxxxx> wrote:Please can somebody explain why this is not working.In my inc file I have a redirect on the secure port for my.secure.domainRewriteRule ^/aaaa/(.*).pdf /bbbb/cccc?param1=xyz¶m2=$1.pdf [L] I have a JKMount for JKMount /bbbb/* worker2I am deliberately doing an "internal redirect" as I do not want the new URLgoing to the browser.I eventually turned on the RewriteLog to see what on earth was going on andit turns out that the redirect does this: init rewrite engine with requested uri /aaaa/abcd.pdf (3) applying pattern '^/aaaa/(.*).pdf' to uri '/aaaa/abcd.pdf' (2) rewrite /aaaa/abcd.pdf -> /bbbb/cccc?param1=xyz¶m2=abcd.pdf (3) split uri=/bbbb/cccc?param1=xyz¶m2=abcd.pdf -> uri=/bbbb/cccc, args=param1=xyz¶m2=abcd.pdf #Fine until here (2) local path result: /bbbb/cccc (2) prefixed with document_root to /usr/local/apache/htdocs/the.document.root/bbbb/cccc # why does it prefix it with the document root and not my.secure.domain ? (1) go-ahead with /usr/local/apache/htdocs/shared.standardlife.com/bbbb/cccc [OK] edir#1] (2) init rewrite engine with requested uri /404.html What can I do to prevent it looking in the DocumentRoot and force it to look in the domain itself ?Your problem is due to the way mod rewrite works. mod-rewrite uses a hook in the "url to filename" translation, which probably is after mod_jk had a look at it. What you could try is add the "PT" (pass through) flag to your rule. Otherwise you can do what we do on our servers: Forget about mod_jk and use rewrite rules to just proxy to the http port on your application server. Krist
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx