Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 54529 invoked from network); 16 Sep 2005 16:09:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Sep 2005 16:09:42 -0000 Received: (qmail 84384 invoked by uid 500); 16 Sep 2005 16:09:25 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 84346 invoked by uid 500); 16 Sep 2005 16:09:25 -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 84298 invoked by uid 99); 16 Sep 2005 16:09:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Sep 2005 09:09:24 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.163.178.171] (HELO web34505.mail.mud.yahoo.com) (66.163.178.171) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 16 Sep 2005 09:09:31 -0700 Received: (qmail 12910 invoked by uid 60001); 16 Sep 2005 16:09:18 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=DINp3q/QPb6rjrDga8fLN8Ru4HhJ14w98V4sr82y4dEdrFE5Yn28Krg9zKKCOW19ZtNmMvxC3M+EvCEczSAlpG1JLOqDwtqavEfPyebQTavfces6VB7nqNhjFJbAG//Mg9fOReNNUEbcbNdm86Hp8AqPLm5WXnGg7j5mdDP4+Xw= ; Message-ID: <20050916160918.12908.qmail@web34505.mail.mud.yahoo.com> Received: from [66.240.80.130] by web34505.mail.mud.yahoo.com via HTTP; Fri, 16 Sep 2005 09:09:18 PDT Date: Fri, 16 Sep 2005 09:09:18 -0700 (PDT) From: Todd To: users@httpd.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] mod_rewrite internal redirect problem X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I have a RewriteRule to change plain html-type URL to a PHP script that dyanamically plugs in the content. It looks like this... Alias /myalias "C:/path/to/htdocs" ... RewriteEngine On RewriteBase /myalias RewriteRule ^(.*)\.html$ page_processor.php?page_requested=$1 [L] Turned up the RewriteLogLevel (to 3) to see what's going on. It seems to do the rewrite correctly, but then does an internal redirect and drops the added query parameter. I've read the mod_rewrite docs and URL Rewriting Guide and I have tinkered with it quite a bit. I goal is to have the rewritten URL be page_processor.php?page_reqested=directory/file, but I end up with only page page_processor.php. Please see below. Thanks, Todd. Here's the log snippet. I removed some junk (IP Addr, Date, Time, etc) for brevity: initial] (2) init rewrite engine with requested uri /myalias/directory/file.html initial] (1) pass through /myalias/directory/file.html initial] (3) [per-dir C:/path/to/htdocs/] strip per-dir prefix: C:/path/to/htdocs/directory/file.html -> directory/file.html initial] (3) [per-dir C:/path/to/htdocs/] applying pattern '^(.*)\.html$' to uri 'directory/file.html' initial] (2) [per-dir C:/path/to/htdocs/] rewrite directory/file.html -> page_processor.php?page_requested=directory/file initial] (3) split uri=page_processor.php?page_requested=directory/file -> uri=page_processor.php, args=page_requested=directory/file initial] (3) [per-dir C:/path/to/htdocs/] add per-dir prefix: page_processor.php -> C:/path/to/htdocs/htdocs/page_processor.php initial] (2) [per-dir C:/path/to/htdocs/] trying to replace prefix C:/path/to/htdocs/ with /myalias initial] (1) [per-dir C:/path/to/htdocs/] internal redirect with /myalias/page_processor.php [INTERNAL REDIRECT] initial/redir#1] (2) init rewrite engine with requested uri /myalias/page_processor.php initial/redir#1] (1) pass through /myalias/page_processor.php initial/redir#1] (3) [per-dir C:/path/to/htdocs/] strip per-dir prefix: C:/path/to/htdocs/page_processor.php -> page_processor.php initial/redir#1] (3) [per-dir C:/path/to/htdocs/] applying pattern '^(.*)\.html$' to uri 'page_processor.php' initial/redir#1] (1) [per-dir C:/path/to/htdocs/] pass through C:/path/to/htdocs/page_processor.php --------------------------------------------------------------------- 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