Let me preface this email by saying that I have tried to research this issue, but have not found a solution that is workable. Hopefully someone can help me figure this out so I don't have to rip my hair out any further. That said...
I have an unlimited Windows hosting account setup on GoDaddy for my own company's website, we'll call that DomainA.com. I do website development for multiple advertising agencies, and projects for their customers. To "mask" my relationships with clients, I registered another domain we'll call DomainB.com. I added this domain to my hosting account and point all traffic for www.domainb.com to a subfolder called /www.domainb.com. Now, because I have multiple clients to handle, I created subdomains under domainb.com. As an example, I have a subdomain for Client 1 with the URL of client1.domainb.com that points to the folder /www.domainb.com/client1. So now, I can tell clients that all their projects can be accessed under the URL http://client1.domainb.com.
Now here is when the problem arises. I have staged a DNN website from my local development machine into the physical directory /www.domainb.com/client1/customera, which is accessible through the URL http://client1.domainb.com/customera. The entry in the PortalAlias table reflects this same URL for the parent portal. What is happening when i load the site is the URL changes to http://client1.domainb.com/www.domainb.com/client1/customer1. If I manually change the URL to http://client1.domainb.com/customer1 the portal loads fine, but any time I click on a link it still refers to http://client1.domainb.com/www.domainb/client1/customer1. This wouldn't be a problem on a staging site except for the fact that when you upload images and add them to pages, the url of the images looks something like this: http://client1.domainb.com/www.domainb/client1/customer1/Portals/0/image.jpg. Once I move the site to its final location, all the image links are broken. Additionally, I don't want the URL to show which physical directory on the server the files are in.
I am truly at a loss for a solution to this. In the GoDaddy control panel, the following IIS7 settings are defined:
/ (application root)
/www.domainb.com (application root)
/www.domainb.com/client1 (application root)
/www.domainb.com/client1/customer1 (application root)
When I add http://client1.domainb.com/www.domainb.com/client1/customer1 as a portal alias, it works. But once I remove it, I end up in an endless redirect loop. Either way, the urls and images that are linked in modules all end up broken because they aren't pointing properly. Somewhere along the line, the URLs are getting rewritten or redirected from client1.domainb.com/customer1 to client1.domainb.com/www.domainb.com/clien1/customer1 and I am at a loss to figure it where or why.
Any and all help or pointers would be GREATLY appreciated. I don't ask for help often as I try to research these issues myself first, but the solution is escaping me!