Last post Dec 28, 2007 08:34 PM by fig007
Nov 04, 2007 09:44 AM|Pecha|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" />
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/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?
Nov 04, 2007 02:12 PMfirstname.lastname@example.org|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.
Nov 04, 2007 03:00 PM|Pecha|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.
Nov 04, 2007 04:25 PM|RCHosting|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.
Nov 08, 2007 03:48 PM|Pecha|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.
Dec 28, 2007 08:34 PM|fig007|LINK
If this is your map replace the ~ with the second domain name:
<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" />
This should work, as it is what I did to fix the same problem.