views:

135

answers:

1

I have a site that needs to use mod_rewrite to direct traffic to www.example.com to 123.45.67.89, port 8080, through an internal proxy. This is the rewrite rule I'm using:

RewriteEngine On
RewriteRule ^(.*)$ http://123.45.67.89:8080/$1  [P]

When I visit www.example.com/myurl, I receive the following error with a 404:

The requested URL /myurl was not found on this server.

This redirect works on our dev server, but not on production. Is there an apache setting that I need to enable in order to make this work?

Thanks

+1  A: 

You need to have mod_proxy enabled to use the P flag.

Gumbo
Thanks Gumbo, this was the correct solution, although I'll add for anyone else viewing the thread in my particular case I needed to enable mod_proxy_http as well.
Travis