Do the website construction of children's shoes should know, site map is very important, especially the XML format sitemap.xml, because spiders (such as Baidu Spider, 360 spider, Sogou spider, etc.) in the station climb too tired, Baidu Spider also like simple work, With this sitemap.xml, spiders are crawling more efficiently. So the development of a dynamic output Sitemap.xml program for the site construction of children's shoes may be said, directly with the dynamic program, so it is not necessary to update, but the spider is to XML format, so obviously this method is not good enough. In fact, it is very simple, on the basis of dynamic programs, the use of pseudo-static can be. However, the following points need to be noted
1. Dynamic Output Program
The format of the output needs to be XML format, if your program is PHP, then only under the head Declaration, the following code can be implemented header ("Content-type:text/xml");
2. sitemap formatBecause it is the XML format, so the requirements will be strict, the following to lock network technology site Map As an example of the following http://www.ledaokj.com/sitemap.xml for the output format <?xml version= "1.0" encoding = "UTF-8"?><!--Declaration XML format--<?xml-stylesheet type= "text/xsl" href= "sitemap.xsl"?> <!--XML template used, The effect is that the browser opens or you can add CSS styles to make the XML display better--<urlset xmlns= "http://www.sitemaps.org/schemas/sitemap/0.9" > <!-- Sitemap protocol Version--<url> <loc>http://www.ledaokj.com/</loc> <priority>1.0</priority> <lastmod>2016-11-09T14:13:10+00:00</lastmod> <changefreq>Always</changefreq> </url > </urlset>
3, pseudo-staticHere are only pseudo-static rules, how to turn on pseudo-static, please see the article "How the company do Web site pseudo-static" #站点地图 rewriterule ^ (. *)/sitemap\.xml$ $1/sitemap\.php [I]
4. sitemap styleEnable Sitemap style is for ordinary users to browse, appear more optimized, not for the Baidu Spider, the specific style can refer to the following file http://www.ledaokj.com/sitemap.xsl as shown in Figure 5, do the above steps, You can automatically generate Sitemap.xml, then you can put your sitemap address to Baidu Webmaster tools, so Baidu Spider can crawl your station in real-time the latest information articles, if not clear how to submit sitemap sitemap, you can view the following article "website Optimization must kill skill: how to submit sitemap.xml to search engine such as Baidu
6, if your website system is a dream system, you can also enable timed generation, refer to the article "Dedecms Tutorial: Timed generation Site Map Sitemap.xml"
This article reprinted to Shenzhen Lock Road network Technology original website: http://www.ledaokj.com/a-wlyx/159/2954.html