Thanks for this. I tried the PT flag and it didn't make any difference.
The disadvantage of not using mod_jk is that by using the http port of
my app server in a rewrite it forces an external redirect and the URL is
exposed to the browser which is not what I want.... Do I gather from
what you're saying about the order that Apache tackles this that it is a
no go ?
Cheers,
Irene
Krist van Besien wrote:
On 3/5/07, Irene Hall <[EMAIL PROTECTED]> 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.domain
RewriteRule ^/aaaa/(.*).pdf
/bbbb/cccc?param1=xyz¶m2=$1.pdf [L]
I have a JKMount for
JKMount /bbbb/* worker2
I am deliberately doing an "internal redirect" as I do not want the
new URL
going to the browser.
I eventually turned on the RewriteLog to see what on earth was going
on and
it 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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]