好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁(yè) > 網(wǎng)站建設(shè) > 建站知識(shí) > 織夢(mèng)制作網(wǎng)站地圖

織夢(mèng)制作網(wǎng)站地圖

POST TIME:2017-11-13 00:15

sitemap是網(wǎng)站上各網(wǎng)頁(yè)的列表。創(chuàng)建并提交sitemap有助于百度(Google)發(fā)現(xiàn)并了解您網(wǎng)站上的所有網(wǎng)頁(yè),包括百度通過(guò)傳統(tǒng)抓取方式可能找不到的網(wǎng)頁(yè)。還可以使用sitemap提供有關(guān)你網(wǎng)站的其他信息,如上次更新日期、sitemap文件的更新頻率等,供百度 (Google)spider參考。

sitemap是網(wǎng)站上各網(wǎng)頁(yè)的列表。創(chuàng)建并提交sitemap有助于百度(Google)發(fā)現(xiàn)并了解您網(wǎng)站上的所有網(wǎng)頁(yè),包括百度通過(guò)傳統(tǒng)抓取方式可能找不到的網(wǎng)頁(yè)。還可以使用sitemap提供有關(guān)你網(wǎng)站的其他信息,如上次更新日期、sitemap文件的更新頻率等,供百度 (Google)spider參考。


一.織夢(mèng)DEDECMS sitemap.html的制作


這里我們用織夢(mèng)自帶的標(biāo)簽生成

但是生成的路徑是在/data目錄下,我們一般放在根目錄下,所以更改一下文件:

  方法如下:


  第一步:打開(kāi)/dede/makehtml_map.php
  •   if($dopost=="site")
  •   {
  •   $murl = $cfg_cmspath."/data/sitemap.html"; //內(nèi)容來(lái)自織夢(mèng)模板團(tuán)
  •   $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm";
  •   }
  •   更改成為
  •   if($dopost=="site")
  •   {
  •   $murl = $cfg_cmspath."/sitemap.html";
  •   $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm";
  •   }

這樣就實(shí)現(xiàn)了sitemap.html放在根目錄的的任務(wù)了

二.織夢(mèng)DEDECMS sitemap.xml的制作
  • <?xml version="1.0" encoding="UTF-8"?>
  • <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
  • <url>
  • <loc>{dede:global.cfg_basehost/}</loc>
  • <lastmod>{dede:arclist row=1 titlelen=24 orderby=pubdate}
  • [field:pubdate function=strftime('%Y-%m-%d',@me)/]
  • {/dede:arclist}</lastmod>
  • <changefreq>always</changefreq>
  • <priority>1.0</priority>
  • </url>
  • {dede:channel row='1000' type='top'}
  • <url>
  • <loc>[field:typelink /]</loc>
  • <changefreq>daily</changefreq>
  • <priority>0.9</priority>
  • </url>
  • {/dede:channel}
  • {dede:arclist row=2000 orderby=pubdate}
  • <url>
  • <loc>[field:arcurl/]</loc>
  • <lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod>
  • <changefreq>monthly</changefreq>
  • <priority>0.8</priority>
  • </url>
  • {/dede:arclist}
  • </urlset>

將上面這個(gè)文件保存成一個(gè)模板文件如gsitemap.htm,放在模板目錄下如templets/plus下

然后織夢(mèng)后臺(tái)操作

里增加一個(gè)列表

按上圖設(shè)置,注意的是,“不限”那里先隨便選擇,保存后再修改成“不限”,然后“更新”,生成文件。

這里有兩個(gè)問(wèn)題:


1.生成欄目和文章鏈接如/npx ,/a/npx/2014/0829/447.html等,沒(méi)有域名,這個(gè)問(wèn)題從后臺(tái)=》核心設(shè)置=》再如下圖開(kāi)啟支持多站點(diǎn)

至此織夢(mèng)中html和xml格式的網(wǎng)站地圖就生成了。



收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266