httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russ" <rsi...@istandfor.com>
Subject Re: [users@httpd] Problems with an extra Rewrite Rule before a RewriteCond
Date Wed, 30 May 2007 16:51:15 GMT
I'm a bit confused.  R means redirect, meaning the server sends the 301 or 302 header to the
browser.  In either case, the browse will redirect to the new URL and that's what will show
in the address bar.  How evactly do you make things redirect without proxying and without
a change in the address bar?  

Russ
Sent wirelessly via BlackBerry from T-Mobile.  

-----Original Message-----
From: "Vincent Bray" <noodlet@gmail.com>
Date: Wed, 30 May 2007 17:33:47 
To:users@httpd.apache.org, rsivak@istandfor.com
Subject: Re: [users@httpd] Problems with an extra Rewrite Rule before a RewriteCond

On 30/05/07, Russ <rsivak@istandfor.com> wrote:
> The R flag means redirect.  You want P for proxy if you want the URL to not change, but
this brings with it a host of other issues.

Russ, you're correct regarding [R] but incorrect pertaining to [P] in
this case. He's rewriting to a local script so there's no need for
proxying. And as he requested, the client won't see the change.

However, I suspect he'll see a loop as this is in .htaccess and
further down the ruleset '.' is rewritten to index.php again.

Thomas, if you get a loop, add this line before your custom rule:
RewriteCond %{REQUEST_URI} !index.php

-- 
noodl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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
Mime
View raw message