Click here to Skip to main content
15,886,077 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends

I have a domain and 4 subdomain
www.domain.com
sa.domain.com
ae.domain.com
in.domain.com

i have to load the sitemap according to my domain that is
if i use my sa.domain.com/sitemap.xml i should get all the sitemap loc with starting sa.domain.com

and if i use my in.domain.com/sitemap.xml i should get all the sitemap loc with starting in.domain.com

is there any way to do .
Posted
Comments
Andy Lanng 30-Mar-15 5:41am    
Is it the same sitemap? if so then just exclude the root: "/path/page.htm"
sreeCoderMan 30-Mar-15 5:42am    
yeah i have only one sitemap for these domains

1 solution

Here is a sample sitemap that does not rely on the domain name:

XML
<sitemap>
  <sitemapnode title="Home" url="/Hub" roles="*">
    <sitemapnode title="Service Admin" roles="Admin,root">
      <sitemapnode title="Flights" url="/Pages/WinService/Flight/List.aspx" roles="Admin,root"></sitemapnode>
      <sitemapnode title="Flight Instances" url="/Pages/WinService/FlightInstance/List.aspx" roles="Admin,root"></sitemapnode>
    </sitemapnode>
    <sitemapnode title="Claims" roles="User,Member,Admin,root">
      <sitemapnode title="List" roles="User,Member,Admin,root" url="/Pages/Claims/Claims/List.aspx"></sitemapnode>
    </sitemapnode>
  </sitemapnode>
</sitemap>


If you exclude the domain then the current domain will be suffixed with the path
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900