0

I have a dedicated linux hosting machine from godaddy. I also have purchased two website domains. Say it is abc.com and xyz.com.

xyz.com is already setup to the server.

I want to get abc.com's traffic to a subfolder of xyz.com but the links must remain as abc.com. i.e abc.com/index.html must be in xyz.com/abc/index.html path. But xyz.com/abc/index.html must return a 404 while abc.com/index.html must return the proper page.

Cœur
  • 37,241
  • 25
  • 195
  • 267
footy
  • 5,803
  • 13
  • 48
  • 96

1 Answers1

0

If you are using apache with mod_proxy enabled, configuring a ReverseProxy will do the job. This is an example of the directives to add in abc.com domain's apache configuration:

 ProxyPass / http://xyz.com/subfoder
 ProxyPassReverse / http://xyz.com/subfolder

These will forward all requests to http://xyz.com/subfoder`

Also have a look to apache's documentation

Ander2
  • 5,569
  • 2
  • 23
  • 42