Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 12912 invoked by uid 500); 10 Mar 2003 10:00:35 -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 12893 invoked from network); 10 Mar 2003 10:00:35 -0000 Received: from unknown (HELO gate.sede.polin.it) (80.16.103.170) by daedalus.apache.org with SMTP; 10 Mar 2003 10:00:35 -0000 Received: from gate.sede.polin.it (localhost.localdomain [127.0.0.1]) by gate.sede.polin.it (8.11.2/8.11.0) with ESMTP id h2A9waD29421 for ; Mon, 10 Mar 2003 10:58:36 +0100 Received: from software (rossignoli.sede.polin.it [192.6.1.76]) by gate.sede.polin.it (8.11.2/8.11.0) with SMTP id h2A9wZJ29415 for ; Mon, 10 Mar 2003 10:58:35 +0100 Message-ID: <002d01c2e6eb$9ac3c720$4c0106c0@software> From: "Andrea" To: References: Date: Mon, 10 Mar 2003 10:58:30 +0100 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.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] URL redirection using apache's mod_rewrite Hi, when using a rule under your .htaccess you need to remove the beginning slash. So to make a simple internal redirection you can use: RewriteEngine On RewriteRule ^page1\.html$ page2.html I added a \. because with regular expression . means "every character", so it needs to be escaped. Also If you write ^page1.html it means that it will matche page11html page1.html page1.htmlfooo because you didn't specified $ which means "end of line" Also I removed the slash from page2.html because it's not necessary unless you want to make an absolute path. About logs I used these lines inside a virtualhost block: RewriteLogLevel 9 RewriteLog "c:\rewrite.c" Hope it helps, ~Andrew ----- Original Message ----- From: "anoop prasanna" To: Sent: Monday, March 10, 2003 16:29 Subject: [users@httpd] URL redirection using apache's mod_rewrite > Hi everyone, i've trying to do some URL redirection with apache but > for some reason it just doesnt work. I'm using a per-directory > configuration, i.e the .htaccess file and i even tried simple > redirections like > > RewriteRule ^/page1.html /page2.html > > but it doesn't work. I've been thru the entire apache manual for > mod_rewrite but i've still been unsuccessful. Is there a much more > deeper thing that i'm missing? probably some configuration elsewhere. > Also where do you give the RewriteLog Directives? In both the > .htaccess and httpd.conf file it gives an error. Please help me out.. > Cheers > Anoop > > --------------------------------------------------------------------- > 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