Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

would anyone be able to possibly give me some guidance..

Basically, i have a 'shared hosting' account with a large internet hosting provider, and my account lets me have multiple seperate domains within this folder structure.(note: not aliased domains and not sub domains). so, my goal is to have 2 domains set up. i have already purchased the two domain names i need: The first domain is the 'primary' domain name for the root folder(eg. and the second domain name is set for one of its sub folders(eg. is set to the folder The problem is that when apache returns a page of the second domain back to the browser, apache writes the hyperlinks as if it's a sub folder of the first domain ( eg. comes out as

Now, I have done some reading on this, looking though "Apache: the definitive guide"(o'reilly), and although it was useful, couldn't really find the answer. i'm guessing this issue is most likely an apache setup issue in http.conf, rather than an issue with the hosting company itself (which is why im posting it here) and I have also been to the official documentation for apache site, and i am guessing i might need to use something like the rewritebase directive in htaccess files.. but im really not sure, im more of a java programmer guy, and have been struggling with this for a couple of days. Any guidance would be REALLY appreciated.

If it helps, my hosting company is godaddy, and my sites are hosted on linux. My problem was originally with wordpress which i reinstalled a number of times in various ways to correct the problem, but ive just done a test with a very simple static html, and it still has the same issue with relative urls like this:

<head></head><body><a href="images/dog.html">Pictures of Dogs</a></body>

However, it is fine if i hardcode the urls like this:

<head></head><body><a href="">Pictures of Dogs</a></body>

Thanks heaps, Steve R


Ok, the problem has now been fixed, and i didn't need to modify any .conf or .htaccess files.

The problem was, that when I went to install the second application into a second domain from the godaddy site, one of the setup questions is that it asks you which site you want it installed to. after that it asks for the desired folder path. However, the problem was that the second domain name was already pointing to the correct subfolder of the primary domain. So when I started installing wordpress again and came to the menu to select which site it was for, and it listed only the primary domain as an option, i assumed that this was like a label of "which hosting account?", or "which primary domain will your application will be installed under?" because I already knew that in the next step i was specifiying the folder. In order to correct this, you must make sure that your second domain is added to your domain list so that it will be listed as an option during the installation process. For further details please read

share|improve this question

The problem is that you are making the DocumentRoot of Example2 a subfolder of the DocumentRoot of example1 which is very confusing to apache. Do you have control over the DocumentRoots? I haven't used GoDaddy linux VPSs before, but you should be able to change the roots so that they are both on the same level, and therefore not subfolders of each other. This article might help.

share|improve this answer
yup, i think you may be right, and thanks for the link. i think the problem i discovered was really just a mechanism to write this into their http.conf file.. but i just didn't see it. Cheers! – Steve Rathbone Feb 11 '10 at 23:49

Your Answer


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.