Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've got a very annoying problem:

our webserver handles 2 (more actually but let's say 2 for a simpler example):


Here's what I want to do: change




So here's my rewriterule:

RewriteCond %{SERVER_NAME} (([a-z]+\.)*)pretassuragentimmobilier.(fr|com)
RewriteRule   ^(.+)$1 [E=THEME:pretassur_agent,QSA]
# if THEME not empty, set it :
RewriteCond   %{ENV:THEME} ^(.+)$
RewriteRule (.*) $1?IDP=%{ENV:THEME} [QSA]

The big (huge) problem is: let's have a look at the rewrite logs:

[] (5)
=> setting env variable 'THEME' to 'pretassur_mandataire'
=> (2) implicitly forcing redirect (rc=302) with

Aaaaaaaaarg! "implicitly forcing redirect" => I don't want that ! I want to internally redirect to, not to make a real redirect!

Now if you type: it is redirected to (try it) I don't want that! I want to display this page but without touching the original host!

Any idea?

Thanks a lot!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Even if they are on the same server you cannot do internal redirects between two different vhosts. Hence the external (302) redirect.

To accomplish what you want you could use the "'proxy|P' (force proxy)" option.

share|improve this answer
That may be the good way to go, but I don't see technnically how to do this... I mean if I use proxy|P option, this implies using the httpd server as a proxy too? If so, what configuration should I add? Thanks again for your answer! – Olivier Pons Dec 23 '10 at 9:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.