You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by howard chen <ho...@gmail.com> on 2009/09/22 15:09:34 UTC

[users@httpd] Reset the REQUEST_URI variable with mod_rewrite

Hello,

Consider rewrite rule as:

RewriteRule ^/test.php  /test2.php [PT,L]


So when I access it via http://www.example.com/test.php


I want the field REQUEST_URI shown as test2.php, is it possible?



THanks.

---------------------------------------------------------------------
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


Re: [users@httpd] Reset the REQUEST_URI variable with mod_rewrite

Posted by howard chen <ho...@gmail.com>.
Hello,


> RewriteRule ^/test.php  /test2.php [R=301,L]
>
> use this in ur redirection , it will redirect as you expected.
>

In fact, I can do it using the P flag (proxy).

But just to know if anything smater...

---------------------------------------------------------------------
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


Re: [users@httpd] Reset the REQUEST_URI variable with mod_rewrite

Posted by sravan kumar <sr...@gmail.com>.
Hello

RewriteRule ^/test.php  /test2.php [R=301,L]

use this in ur redirection , it will redirect as you expected.

Sravan

On Tue, Sep 22, 2009 at 6:39 PM, howard chen <ho...@gmail.com> wrote:

> Hello,
>
> Consider rewrite rule as:
>
> RewriteRule ^/test.php  /test2.php [PT,L]
>
>
> So when I access it via http://www.example.com/test.php
>
>
> I want the field REQUEST_URI shown as test2.php, is it possible?
>
>
>
> THanks.
>
> ---------------------------------------------------------------------
> 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
>
>