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

I have a website, www.mysite.com

My client has their site, www.clientsite.com

We would like to setup where www.clientsite.com/directory shows the pages that are hosted at www.mysite.com/directory

Ideally it would be an A-Record type of setup, so we are not feeding data from my server to the client's server.

Any suggestions about how to achieve this would be greatly appreciated.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

DNS resolves (host)names to IP addresses. It doesn't know the first thing about directories on a web server. What you actually want is a reverse proxy. See this answer.

share|improve this answer

As Christopher Perrin has said, DNS is NOT responsible for URLs. It is only responsible for associating a domain-name to an IP address.

There are alternative ways to work within these confines:

The use of sub-domains. i.e. www.some-site.com may be your "site"... and have images.some-site.com as an alias in your web-server to "www.some-site.com/images".

Depending on your web-server and it's configuration, you can set up "global" paths that are mapped on every site that points to a common directory... (i.e. http://siteA.com/directory1 is the same as http://siteB.com/directory1 but http://siteA.com/directory2 is not the same as http://siteB.com/directory2

You can even use redirects to get you to the proper URL if all else fails.

share|improve this answer

No, that is not possible. DNS is responsible for resolving an IP to a Name and reversed (and for a few other things). The structure with the URLs is the responsibility of your webserver. I foyu have access to the webserver config you can have look into rewriting or reverse proxying,

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.