Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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 Answer 1

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

share|improve this answer

Your Answer

 
discard

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.