Can I create links between two add-on domains folder present in a primary root domain?

54 Views Asked by At

I have a primary root domain as public_html. In this root domain, I have three more folders including

  1. a (have WordPress website which is running on root domain),
  2. b (client area custom CMS)
  3. c (Admin area custom CMS with add-on domain attached)

They are linked to each other and working fine. Now, I am trying to add another wordpress website as add-on domain under folder "d". My basic problem is, I am unable to link b, c and d just as a, b and c. If I make a copy of b and c under d folder then it works. I am not interested in making multiple copies and want to keep b, and c same for any more websites I add. Any suggestions?

What I understand that d folder has now become a root itself so I can't link to its siblings but there should be something there to stop duplicating the cms with every website.

1

There are 1 best solutions below

2
phpenthusiast On

This process is fairly straightforward in a Plesk Control Panel situation. You emphasized the intent to avoid replication of site content to accomplish linking to them. I've successfully targeted a new domain to an existing webhost file area which results in a second web address pointing to the EXACT same files that are already served up under an existing web address. (the two domains need to be under the same subscription since a single subscription shares a common web host file area:

/public_html (hosting area for site A)
/public_html/a (word press)
/public_html/b (custom CMS)
/public_html/c (admin area for custom CMS)
/d (Because you described the new "d" site as being it's down root, then the directory structure would look like this)

so the answer for how to "link" to the files hosted in any of the other file areas can be accomplished via Unix Symbolic Links (an analog of the Windows Shortcut) so when the webserver sees a reference to /d/a, it will follow the symbolic link and serve up what actually exists in /public_html/a BUT if you do this then WordPress will NOT be happy because it's being accessed via a web address it doesn't recognize. The custom CMS and admin for same might also be confused when you attempt to access those files via a web address they weren't originally set up for.

It would help A LOT if you were more specific with what you actually mean by "link" since putting a <a href="(original site web address)">my wordpress site</a> would effectively "link" to the existing site without having to copy or clone anything.