Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 58709 invoked from network); 26 Aug 2006 00:12:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Aug 2006 00:12:03 -0000 Received: (qmail 20702 invoked by uid 500); 26 Aug 2006 00:11:54 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 20687 invoked by uid 500); 26 Aug 2006 00:11:54 -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 20676 invoked by uid 99); 26 Aug 2006 00:11:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2006 17:11:54 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jslive@gmail.com designates 66.249.82.234 as permitted sender) Received: from [66.249.82.234] (HELO wx-out-0506.google.com) (66.249.82.234) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2006 17:11:51 -0700 Received: by wx-out-0506.google.com with SMTP id s19so1001719wxc for ; Fri, 25 Aug 2006 17:11:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=PSVqN0/abp6G840TykqZOkVXPnBAcQhoQfC+YEn3wdWzxdlksjRr9zz+ZpCMizRxrwwCLTpjDeJBeSC61fJ99moAnNp462NLjWkbC/FPGJQZwCZ/2bdTubPioShBLeALUwkEqKaVBBpKgPrjUXtQhxYp2tqSGG7oW+yIo+YIqUU= Received: by 10.70.51.17 with SMTP id y17mr5529053wxy; Fri, 25 Aug 2006 17:11:31 -0700 (PDT) Received: by 10.70.45.4 with HTTP; Fri, 25 Aug 2006 17:11:31 -0700 (PDT) Message-ID: Date: Fri, 25 Aug 2006 20:11:31 -0400 From: "Joshua Slive" Sender: jslive@gmail.com To: users@httpd.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44EF89CE.5090508@googlemail.com> X-Google-Sender-Auth: cf65a1b4698caecb X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] 301 redirect with mod_rewrite? Possible to use relitive paths rather then FQDN paths? X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 8/25/06, John H. Nyhuis wrote: > I was wondering if anyone has given thought to allowing the use of > relative paths with the mod_rewrite package rather then requiring full > paths. i.e., in the .htaccess file: > > "Redirect 301 ./neuro.asp ../neurology.php" (does not work) > > instead of: > > "Redirect 301 /pedtest/divisions/neuro/neuro.asp > http://depts.washington.edu/pedtest/divisions/neurology.php" > > (does work) > > Just asking because our dev->testing->production setup has different > absolute FQDN's at each spot, and this means the .htaccess file is > specific to each of the environments. It would be convenient to not have > to remember to change the .htaccess file each time a new site version gets > pushed through the process. You can't use relative paths, but you can accomplish the same thing: RewriteRule (.*)(/[^/]*)/neuro.asp $1/neurology.php [R=301] (That may need to be adjusted, but it should give you the idea.) Joshua. --------------------------------------------------------------------- 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