httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] HELP: How to Rewrite?
Date Tue, 01 Apr 2003 15:59:58 GMT
>-----Original Message-----
>From: António Rafael Paiva []
>Sent: Dienstag, 1. April 2003 17:42
>To: Apache mailing list
>Subject: [users@httpd] HELP: How to Rewrite?
>Hi everyone!
>I would like to know how can i set a rewrite rule so that 
>a server (consider which is going to get 
>request to other servers (e.g., 
>, etc) which i do not know, can 
>respond as if the request as
>All the request for would have to be 
>In a Apache HOWTO i saw that i could use
>RewriteEngine On RewriteRule /.*
>but this also changes requests to my server right? Does 
>this cause client to cache the entry, if yes how can i 
>prevent this?

mod_rewrite can operate in two ways: 

1) It can send a redirect, in which the browser sends a new request to
the new URL and so the browser changes.


2) It can use mod_proxy, in which case apache gets the new page and
serves it directly so the browser does not change.

To get it to use mod_proxy, you must have mod_proxy loaded and you must
put a [P] flag after the RewriteRule, e.g.

	RewriteEngine On 
	RewriteRule /(.*) [P]

NB it is the back-end server which goes in the RewriteRule. Your server
( is the front-end so doesn't appear in the

Read the mod_rewrite manual for details
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

>Could someone PLEASE help me!
>António Rafael C. Paiva
>Electronics and Telecommunications Dep.
>Aveiro University
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:> for more info.
>To unsubscribe, e-mail:
>   "   from the digest:
>For additional commands, e-mail:

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message