my first domain domain1.com points to the root directory.
my second domain domain2.com point to the subdirectory e.g.: /sites/domain2
http://www.domain2.com/default.aspx - works well (http://www.domain2.com/sites/domain2/default.aspx also works well)
but if i make Response.Redirect("~/Default.aspx") from http://www.domain2.com/default.aspx it will redirects me to http://www.domain2.com/sites/domain2/default.aspx.
Also I'm using web.sitemap at http://www.domain2.com/, e.g.:
If I add TreeView and will use SiteMapDataSource as DataSource, all urls in treeview will be displayed in forms like these:
http://www.domain2.com/sites/domain2/default.aspx, http://www.domain2.com/sites/domain2/pages/page1.aspx etc., but I expected to see http://www.domain2.com/default.aspx, http://www.domain2.com/pages/page1.aspx etc (without /sites/domain2).
Do you know how to avoid this?
hmmm. you are right. i use UrlRewritingNet in the domain1.com (root folder). i don't use UrlRewritingNet in the domain2.com. i didn't have any rules like redirect to sites/domain2 etc.. also without any UrlRewritingNet rules and at all without UrlRewritingNet
everything is still the same.
Would it be better if they are all different web roots or websites?
You could then use somthing like domain2.domain1.com, or create new sites but make the path sites/domain2/ as its root. No sure if you can do these things with GoDaddy.
You should get a windows reseller account or multi domain account, both will allow you to host a large number of domains (sites) and domain aliases, GoDaddy is a bit limited in the things you can do.
Thank you for contacting Online Support. Because of the directory structure of a hosting account with secondary or 'Aliased' domains, the URL will show the full path. Unfortunately, there
is no way to mask this. The only way to avoid this is to have the domains hosted in separate hosting plans. Any applications running on the aliased domains will need to take the path into account. I apologize for any inconvenience.
------------------
So there is no way to do it in standard way. But I can just try to remove /sites/domain2 from the URLs, because they are working well without it too.
Does anybody know where urls are building? I mean place where they are transforming from "~/Default.aspx" to http://www.site.com/default.aspx.
Pecha
Member
252 Points
54 Posts
Host multiple domains from a single hosting account at GoDaddy.com (ASP.NET 2.0)
Nov 04, 2007 09:44 AM|LINK
I have a problem with this Adding Domains To Your Hosting Account.
my first domain domain1.com points to the root directory.
my second domain domain2.com point to the subdirectory e.g.: /sites/domain2
http://www.domain2.com/default.aspx - works well (http://www.domain2.com/sites/domain2/default.aspx also works well)
but if i make Response.Redirect("~/Default.aspx") from http://www.domain2.com/default.aspx it will redirects me to http://www.domain2.com/sites/domain2/default.aspx.
Also I'm using web.sitemap at http://www.domain2.com/, e.g.:
<siteMapNode url="~/Default.aspx" title="Default">
<siteMapNode url="~/Pages/Page1.aspx" title="Page1" />
<siteMapNode url="~/Pages/Page2.aspx" title="Page2" />
<siteMapNode url="~/Pages/Page3.aspx" title="Page3" />
</siteMapNode>
If I add TreeView and will use SiteMapDataSource as DataSource, all urls in treeview will be displayed in forms like these: http://www.domain2.com/sites/domain2/default.aspx, http://www.domain2.com/sites/domain2/pages/page1.aspx etc., but I expected to see http://www.domain2.com/default.aspx, http://www.domain2.com/pages/page1.aspx etc (without /sites/domain2).
Do you know how to avoid this?
Godaddy multiple domains
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: Host multiple domains from a single hosting account at GoDaddy.com (ASP.NET 2.0)
Nov 04, 2007 02:12 PM|LINK
I don't believe you can in GoDaddy unless you use a URLRewrite of some sort. But GoDaddy support would know I'm sure.
Jeff
Pecha
Member
252 Points
54 Posts
Re: Host multiple domains from a single hosting account at GoDaddy.com (ASP.NET 2.0)
Nov 04, 2007 03:00 PM|LINK
hmmm. you are right. i use UrlRewritingNet in the domain1.com (root folder). i don't use UrlRewritingNet in the domain2.com. i didn't have any rules like redirect to sites/domain2 etc.. also without any UrlRewritingNet rules and at all without UrlRewritingNet everything is still the same.
RCHosting
Member
68 Points
27 Posts
Re: Host multiple domains from a single hosting account at GoDaddy.com (ASP.NET 2.0)
Nov 04, 2007 04:25 PM|LINK
Would it be better if they are all different web roots or websites?
You could then use somthing like domain2.domain1.com, or create new sites but make the path sites/domain2/ as its root. No sure if you can do these things with GoDaddy.
You should get a windows reseller account or multi domain account, both will allow you to host a large number of domains (sites) and domain aliases, GoDaddy is a bit limited in the things you can do.
Pecha
Member
252 Points
54 Posts
Re: Host multiple domains from a single hosting account at GoDaddy.com (ASP.NET 2.0)
Nov 08, 2007 03:48 PM|LINK
I got the response from support:
------------------
Thank you for contacting Online Support. Because of the directory structure of a hosting account with secondary or 'Aliased' domains, the URL will show the full path. Unfortunately, there is no way to mask this. The only way to avoid this is to have the domains hosted in separate hosting plans. Any applications running on the aliased domains will need to take the path into account. I apologize for any inconvenience.
------------------
So there is no way to do it in standard way. But I can just try to remove /sites/domain2 from the URLs, because they are working well without it too.
Does anybody know where urls are building? I mean place where they are transforming from "~/Default.aspx" to http://www.site.com/default.aspx.
Thanks!
fig007
Member
8 Points
10 Posts
Re: Host multiple domains from a single hosting account at GoDaddy.com (ASP.NET 2.0)
Dec 28, 2007 08:34 PM|LINK
If this is your map replace the ~ with the second domain name:
So,
<siteMapNode url="~/Default.aspx" title="Default">
<siteMapNode url="~/Pages/Page1.aspx" title="Page1" />
<siteMapNode url="~/Pages/Page2.aspx" title="Page2" />
<siteMapNode url="~/Pages/Page3.aspx" title="Page3" />
</siteMapNode>
Becomes,
<siteMapNode url="//domain2.com/Default.aspx" title="Default">
<siteMapNode url="//domain2.com/Pages/Page1.aspx" title="Page1" />
<siteMapNode url="//domain2.com/Pages/Page2.aspx" title="Page2" />
<siteMapNode url="//domain2.com/Pages/Page3.aspx" title="Page3" />
</siteMapNode>
This should work, as it is what I did to fix the same problem.