Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 5634 invoked from network); 22 Feb 2007 18:21:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Feb 2007 18:21:37 -0000 Received: (qmail 68726 invoked by uid 500); 22 Feb 2007 18:21:34 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 68710 invoked by uid 500); 22 Feb 2007 18:21:34 -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 68699 invoked by uid 99); 22 Feb 2007 18:21:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Feb 2007 10:21:34 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [209.18.107.89] (HELO netbits.us) (209.18.107.89) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 22 Feb 2007 10:21:21 -0800 Received: (qmail 10982 invoked by uid 0); 22 Feb 2007 18:07:22 -0000 Received: from trutwins.homeip.net (dhcp.215013.en-tel.net [69.46.215.13]) by fastconcepts.com ([65.17.208.228]) with SMTP via SSL; 22 Feb 2007 18:07:22 -0000 Received: (qmail 11570 invoked by uid 5033); 22 Feb 2007 18:20:57 -0000 Received: from 192.168.0.10 by rachmaninoff (envelope-from , uid 0) with qmail-scanner-1.25 (clamdscan: 0.88.3/1598. spamassassin: 3.1.3. Clear:RC:1(192.168.0.10):. Processed in 0.21209 secs); 22 Feb 2007 18:20:57 -0000 X-Qmail-Scanner-Mail-From: josh@trutwins.homeip.net via rachmaninoff X-Qmail-Scanner: 1.25 (Clear:RC:1(192.168.0.10):. Processed in 0.21209 secs) Received: from prokofiev.trutwins.homeip.net (prokofiev.trutwins.homeip.net [192.168.0.10]) by trutwins.homeip.net ([192.168.0.244]) with ESMTP via SSL; 22 Feb 2007 18:20:55 -0000 Date: Thu, 22 Feb 2007 12:20:51 -0600 From: Josh Trutwin To: users@httpd.apache.org Message-ID: <20070222122051.401a6c79@prokofiev.trutwins.homeip.net> X-Mailer: Claws Mail 2.7.2 (GTK+ 2.10.6; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] avoiding a redirect loop with rewrites Hi, I'm working for a small company that uses a custom CMS. When customers create pages in the CMS a file gets created based on the page's id number - for example: www.mysite.com/pages/pid5.html I've pushed some code into the CMS that lets the site admin create a nice URL for each page so you get something nicer like: www.mysite.com/products.html The pid5.html file still exists but now they should see the new URL everywhere on the site. The rule I used for this was: RewriteRule ^products.html$ /pages/pid5.html [L,QSA,NC] One of the folks in charge here wanted to make sure that for existing sites anyone who still had the old URL bookmarked or search engines that have the old URL gets a permanent redirect to the new one to avoid having two URLs that go to the same place. I thought I'd do this with a RedirectPermanent, but when I do that I get a redirect loop. I also tried creating rewrite rules for the pid5.html page - no luck. Basically, is there any way to have a rewrite rule map a new URL name to an existing page, and also a permanent redirect for anyone using the old URL name. I would have to think this has come up before but wasn't able to find anything. Thanks for your help, Josh --------------------------------------------------------------------- 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