0

I need to rewrite a incoming request for a particular file. The file will have a suffix of .rtfx and I need to remove the host (http://www.host.com/) and replace it with another.

Request *.rtfx file Request is http://www.host.com/blah/blah/rtfx.com Replace http://www.host.com/ with something else.

I have tried to figure out how to do this with mod_proxy, but it looks like mod_rewrite is my only option.

Thomas Vincent
  • 1,110
  • 6
  • 13

1 Answers1

0

With mod_proxy:

ProxyPassMatch ^/(blah/blah/.*\.rtfx)   http://www.somewhereelse.com/$1

With mod_rewrite:

RewriteEngine On
RewriteRule  ^/(blah/blah/.*\.rtfx)     http://www.somewhereelse.com/$1 [P,L]

Put this in the server config for your host...

Krist van Besien
  • 1,862
  • 13
  • 16