Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 66021 invoked by uid 500); 3 Sep 2002 18:53:47 -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 66010 invoked from network); 3 Sep 2002 18:53:46 -0000 Received: from unknown (HELO traven9.uol.com.br) (200.221.4.35) by daedalus.apache.org with SMTP; 3 Sep 2002 18:53:46 -0000 Received: from ci800031 ([192.168.209.26]) by traven9.uol.com.br (8.9.1/8.9.1) with SMTP id PAA04899 for ; Tue, 3 Sep 2002 15:55:21 -0300 (BRT) Message-ID: <025501c2537b$45a0e3d0$1ad1a8c0@ci800031> From: "Rodrigo Campos" To: References: Date: Tue, 3 Sep 2002 15:53:57 -0300 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.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] help with URL redirection It can be accomplished with mod_rewrite: RewriteCond %{REQUEST_URI} ^/([^/]+)/?$ RewriteCond /documentroot/%1 !-d [NC] RewriteRule /.* http://calendar.domain.com/view.php?ID=%1 [R,L] Your mileage may vary, but this should work ;) -- Rodrigo Albani de Campos http://geekbunker.org/rodrigo/?sig Eat Healthy Stay Fit Die Anyway ----- Original Message ----- From: "Chad Day" To: Sent: Tuesday, September 03, 2002 3:11 PM Subject: [users@httpd] help with URL redirection > I can't seem to figure out how to write this rule.. > > I want requests going to http://calendar.domain.com/username to be > automatically forwarded to http://calendar.domain.com/view.php?ID=username. > The catch is I only want to forward requests when the username part is 404, > so when users try to access normal pages at calendar.domain.com, they come > up directly and aren't forwarded via the rule. So, I need a rule to detect > if the page is 404, and instead of showing an error page, redirect them to > the view.php page. Or am I just better off building in some sort of > autoforwarder for all 404 pages served on calendar.domain.com? > > Thanks, > Chad > > > --------------------------------------------------------------------- > 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 > > --------------------------------------------------------------------- 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