0

I am running a FreeBSD server and I want to redirect a specific website domain to another domain including subdirectory.

I want to bypass that domain to alter the XML results it returns.

I tried the hosts file solution, but that way I can only redirect to an IP address without subdir. So that's no solution.

Is there another way to solve this? Installing something on the server if needed is not a problem. Unless it's a heavy program.

PLEASE NOTE: I do not own Domain1.com. Else the solution was simple.

Saeverix
  • 103
  • 2
Werner
  • 1
  • Did you try to use mod_rewrite? – quanta Nov 25 '11 at 14:34
  • It's a program that requests info from www.example.com. No way I can change that URL. I want www.example.com to be redirected to www.mysite.com/subdir. So mod_rewrite wont work... – Werner Nov 25 '11 at 15:05

1 Answers1

0

you put this on yout www.example.com index.html file

<html>
<head>
<meta http-equiv="REFRESH" content="0;url=http://www.mysite.com/subdir">
</head>
</html>

You can also use mod_prox to set up a basic reverse proxy, apache documentation is great and easy to understand

m0ntassar
  • 1,263
  • 7
  • 12