Re: https redirect not being resolved as expected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.domain

     RewriteRule ^/aaaa/(.*).pdf
/bbbb/cccc?param1=xyz&param2=$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&param2=abcd.pdf

 (3) split uri=/bbbb/cccc?param1=xyz&param2=abcd.pdf -> uri=/bbbb/cccc,
args=param1=xyz&param2=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

--
krist.vanbesien@xxxxxxxxx
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
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


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux