Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 75879 invoked from network); 23 Aug 2006 09:30:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Aug 2006 09:30:34 -0000 Received: (qmail 17596 invoked by uid 500); 23 Aug 2006 09:30:26 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 16600 invoked by uid 500); 23 Aug 2006 09:30:24 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 16589 invoked by uid 99); 23 Aug 2006 09:30:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Aug 2006 02:30:24 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [217.72.192.247] (HELO fmmailgate06.web.de) (217.72.192.247) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Aug 2006 02:30:23 -0700 Reveived: from web.de by fmmailgate06.web.de (Postfix) with SMTP id 6A920457 for ; Wed, 23 Aug 2006 11:30:02 +0200 (CEST) Received: from [62.206.40.35] by freemailng6204.web.de with HTTP; Wed, 23 Aug 2006 11:30:02 +0200 Date: Wed, 23 Aug 2006 11:30:02 +0200 Message-Id: <95835047@web.de> MIME-Version: 1.0 From: Lothar Krenzien To: users@httpd.apache.org Organization: http://freemail.web.de/ Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] redirect only if a URL does not exists X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Joshua, What I saw are the following lines in the logfile : ... initial (5) RewriteCond URI (-U) check: path=/conergy/Welcome.do -> status=200 initial (4) RewriteCond: input='/conergy/Welcome.do' pattern='!-U' => not-matched initial (2) rewrite '/conergy/Welcome.do' -> 'http://localhost/sunreader/Welcome.do?mandant=conergy' initial (3) split uri=http://localhost/sunreader/Welcome.do?mandant=conergy -> uri=http://localhost/sunreader/Welcome.do, args=mandant=conergy initial (2) forcing proxy-throughput with http://localhost/sunreader/Welcome.do initial (1) go-ahead with proxy request proxy:http://localhost/sunreader/Welcome.do [OK] initial (2) init rewrite engine with requested uri /sunreader/Welcome.do initial (3) applying pattern '^/(.*).do' to uri '/sunreader/Welcome.do' subreq (2) init rewrite engine with requested uri /sunreader/Welcome.do subreq (3) applying pattern '^/suntechnics/admin/(.*)$' to uri '/sunreader/Welcome.do' subreq (1) pass through /sunreader/Welcome.do initial (5) RewriteCond URI (-U) check: path=/sunreader/Welcome.do -> status=200 <== this URL doesn't work initial (4) RewriteCond: input='/sunreader/Welcome.do' pattern='!-U' => not-matched ... For me it looks like that Apache calls the URL that doesn't exist for now but gets 200 instead of 4xx or 5xx back. Maybe it's easier to explain what I want to do: I have Apache HTTPD on port 80 and Tomcat on Port 8080. Our customers call a URL like http://server/conergy/Welcome.do or http://server/suntechnics/Welcome.do This URL should changed by Apache to http://server/sunreader/Welcome.do?mandant=xxx and is done by a RewriteRule The new URL should 'forwared' to Tomcat on Port 8080. When Tomcat is offline (for example the service is not running) I want to display a customized error-site which is (of course) located in the I know that I can define an ErrorDocument. But it doesn't seem to work. Don't know why. The definition of the ErrorDocument looks like : ErrorDocument 404 http://localhost/Portal_Update.php But instead of that site only the standard error site is displayed. I changed the rewrite rules a little bit: # the offline document RewriteCond %{REQUEST_URI} !-U RewriteRule ^/(.*).do http://localhost/Portal_Update.php [R,L] # portal RewriteRule ^/conergy/(.*).do$ http://localhost/sunreader/$1.do?mandant=conergy [R,L,P] RewriteRule ^/suntechnics/(.*).do$ http://localhost/sunreader/$1.do?mandant=suntechnics [R,L,P] Now I get an 404 instead of 503. I included the P and R flag But as just sayed I can't define a custom error document. Thanks, Lothar --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org