You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andrew Hole <an...@gmail.com> on 2008/12/22 11:24:34 UTC

[users@httpd] RewriteRule

Hi Guys!

I'm trying to setup a RewriteRule to redirect requests to a new different
server , but I want to keep the original URL on address bar.
How can I do that?

    RewriteEngine on
    RewriteLog /var/log/httpd/rewrite.log
    RewriteLogLevel 9
    RewriteCond %{QUERY_STRING} msg=online
    RewriteRule (.*) http://myserver/ [L]


Thanks a lot
A.

Re: [users@httpd] RewriteRule

Posted by Krist van Besien <kr...@gmail.com>.
On Mon, Dec 22, 2008 at 3:26 PM, Andrew Hole <an...@gmail.com> wrote:
> With P flag i get 404 error code.

What does the error log say?

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

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

Posted by Andrew Hole <an...@gmail.com>.
With P flag i get 404 error code.


On Mon, Dec 22, 2008 at 1:00 PM, Bob Ionescu <bo...@googlemail.com>wrote:

> 2008/12/22 Andrew Hole <an...@gmail.com>:
> > I'm trying to setup a RewriteRule to redirect requests to a new different
> > server , but I want to keep the original URL on address bar.
> > How can I do that?
>
> Use the P flag to force that the request is handled by mod_proxy et
> al. (reverse proxying).
>
> Bob
>
> ---------------------------------------------------------------------
> 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] RewriteRule

Posted by Bob Ionescu <bo...@googlemail.com>.
2008/12/22 Andrew Hole <an...@gmail.com>:
> I'm trying to setup a RewriteRule to redirect requests to a new different
> server , but I want to keep the original URL on address bar.
> How can I do that?

Use the P flag to force that the request is handled by mod_proxy et
al. (reverse proxying).

Bob

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