如何根据我的域和子域显示我的站点地图 [英] How to Show my sitemap according to my domain and subdomain

查看:118
本文介绍了如何根据我的域和子域显示我的站点地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友



我有一个域名和4个子域名

www.domain.com

sa .domain.com

ae.domain.com

in.domain.com



i必须加载根据我的域名的网站地图

如果我使用我的 sa.domain.com/sitemap.xml 我应该获得所有的sitemap loc开始 sa.domain.com



如果我使用我的 in.domain .com / sitemap.xml 我应该以 in.domain.com

获取所有站点地图的位置

有什么办法可以做。

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 .

推荐答案

这是一个不依赖域名的示例站点地图:



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

<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


这篇关于如何根据我的域和子域显示我的站点地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆