Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 2413 invoked from network); 11 Dec 2003 14:39:48 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 11 Dec 2003 14:39:48 -0000 Received: (qmail 52107 invoked by uid 500); 11 Dec 2003 14:39:32 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 51923 invoked by uid 500); 11 Dec 2003 14:39:30 -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: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 51909 invoked from network); 11 Dec 2003 14:39:29 -0000 Received: from unknown (HELO mail.profundis.se) (213.80.46.101) by daedalus.apache.org with SMTP; 11 Dec 2003 14:39:29 -0000 X-ITHouse-Forward-Path: Received: From PROFUNDIS01 by mail.profundis.se (IT House Mail Server [TRIAL - 120 days left]); Thu, 11 Dec 2003 15:39:06 +0100 Message-ID: <0b0e01c3bff4$87e6c840$652e50d5@profundis.se> Reply-To: "Robert Andersson" From: "Robert Andersson" To: References: <14A951E5C6C54140836A9E1ECEB5AC2D0238474A@WHTE2K.mackie.com> Date: Thu, 11 Dec 2003 15:39:06 +0100 Organization: Profundis MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] Another mod_rewrite question X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Sean Correia wrote: > I have a mix of static and dynamic pages on my site, and need > a mechanism that if a user requests /bar/foo.shtml and if is not > found the server will use /bar/foo.phtml This might work: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)\.shtml$ $1.phtml The condition for the rule is that the requested file doesn't exist, and the rule will change the file extension. Might require some tweaking though; read up on the docs to verify what it does and if it cause trouble, check the rewrite log. Regards, Robert Andersson --------------------------------------------------------------------- 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