View Full Version : Help with links using an ADDON domain?

06-30-2011, 11:49 AM
I have a basic question about links within a site. Basically I built a site using Dreamweaver, lets call it "Site2.com". When I built this site, I used all links, relative to the document root which I understand is the Dreamweaver default.

Now, what I would like to do, is host the site as an ADDON site to my server which is registered as "Site1.net".

What I did, after registering Site2.com domain and pointing the DNS servers in the proper direction to my server, and registering Site2.com as an ADDON site to Site1.net with my hosting company, I created a folder within Site1.net public_html called Site2.com.

When I upload a single index.php test page, without links to the folder called Site2.com, and test it in a browser, the test page loads from the server fine. (I am using Filezilla to upload, rather than Dreamweaver FTP).
IE: home/Site1/public_html/Site2/index.php

The problem that I am having is that when I start loading the actual pages of Site2 with all their links the pages don't work, and links are broken, although they work fine within the dreamweaver testing environment.

Does this mean that I have to go through the entire Site2 pages and hand change all the links to absolute links? (ie: http://www.site2.com/public_html/for (http://www.site2.com/public_html/for) all links on page1...page2...page3, etc?

Or is there a softer, gentler way, as the site has about 2o pages of mixed HTML and php code, and some of these pages have 15+ links each?
Any thoughts would be appreciated.

07-01-2011, 06:40 AM
Having an addon domain should work in the same way. If you have cpanel then it will create a folder called www.whateverurl.com. Create an FTP account that uploads directly to that folder within public_html and you should find that relative links work just fine.