sitemap

Empty URL In SiteMapNode

让人想犯罪 __ 提交于 2019-12-23 12:18:53
问题 I've got a SiteMap with blank URL attributes in each siteMapNode. Anyone know how to render them if the URL is blank? I'm doing a foreach against the SiteMap.CurrentNode and it doesn't retrieve siteMapNode elements that have empty URL attributes, but I do need to render them (just without a URL). Any ideas? 回答1: I do not know it's good or bad practice. But generally for such requirement I do use string "#" as empty url. It serves empty url purpose. 回答2: To render a site map node with a blank

WordPress实现伪静态

不羁的心 提交于 2019-12-23 11:14:04
点击最下面的 自定义结构 然后输入 /%post_id%.html ,然后保存更改,地址就会变为静态地址了 当然,并没有完 继续 复制下面的代码: [ISAPI_Rewrite] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 # Protect httpd.ini and httpd.parse.errors files # from accessing through HTTP # Rules to ensure that normal content gets through RewriteRule /sitemap.xml /sitemap.xml [L] RewriteRule /favicon.ico /favicon.ico [L] # For file-based wordpress content (i.e. theme), admin, etc. RewriteRule /wp-(.*) /wp-$1 [L] # For normal wordpress content, via index.php RewriteRule ^/$ /index.php [L] RewriteRule /(.*) /index.php/$1 [L] 创建文件httpd.ini 上传到根目录即可,若不行

How to create XML sitemap programmatically in c#

风流意气都作罢 提交于 2019-12-23 09:02:43
问题 I am building an website. Now I want to create its xml site map like google site map. But I want to create it programmatically using C#. Can anybody tell me how I can access the root directory on the web server using base url of my website get all the pages list into a string list? 回答1: come easy private void GenerateXML() { try { string fileName = "sitemap.xml"; string DOMAIN = "http://www.sohel-elite.com"; string LAST_MODIFY= String.Format("{0:yyyy-MM-dd}", DateTime.Now); string CHANGE_FREQ

Django NameError urls.py

你说的曾经没有我的故事 提交于 2019-12-23 03:04:14
问题 Im getting a name error: name sitemaps is not defined from my urls.py when I try to integrate sitemaps with my application. From my urls.py: from django.contrib.sitemaps import Sitemap (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), Is there something wrong with this regular expression from my urls.py? Or is there another problem going on? Thanks for your input 回答1: Generally you will do something like this - from django.contrib.sitemaps import Sitemap,

Django NameError urls.py

老子叫甜甜 提交于 2019-12-23 03:03:18
问题 Im getting a name error: name sitemaps is not defined from my urls.py when I try to integrate sitemaps with my application. From my urls.py: from django.contrib.sitemaps import Sitemap (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), Is there something wrong with this regular expression from my urls.py? Or is there another problem going on? Thanks for your input 回答1: Generally you will do something like this - from django.contrib.sitemaps import Sitemap,

How to create index for django sitemaps for over 50.000 urls

血红的双手。 提交于 2019-12-22 07:06:43
问题 I have the following url configuration url(r'^sitemap\.xml$', index, {'sitemaps': sitemaps}), url(r'^sitemap-(?P<section>.+)\.xml', cache_page(86400)(sitemap), {'sitemaps': sitemaps}), and sitemaps include following sitemap class ArticlesDetailSiteMap(Sitemap): changefreq = "daily" priority = 0.9 def items(self): return Article.objects.filter(is_visible=True, date_published__lte=timezone.now()) but there are more than 50.000 articles. So i get timeout error when i try /sitemap-articles.xml

How to let sitemap generator fully crawl Angular router for SPA?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 04:33:12
问题 I am trying to generate a sitemap for my webpage. The sitemap generators online only show me a homepage on xml file. <?xml version="1.0" encoding="UTF-8"?> -<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> -<url> <loc>http://margvel.com</loc> <priority>0.5</priority> </url> </urlset> my webpage meanwhile has several routes in angular. to see the webpage you could go to margvel.com I used couple of sitemap generators. xml-sitemap and botmap I checked botmap, because it should have

Validation of XML Sitemap urlset with xhtml:link inside url element

泪湿孤枕 提交于 2019-12-21 05:28:13
问题 I am trying to create a sitemap such as the below and I get this error: <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xhtml:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> <url> <loc>http://www.something.com/something</loc> <xhtml:link rel="alternate" hreflang="en-us" href="http://www.something.com/something" /> </url> </urlset>

How to generate graphical sitemap of large website [closed]

China☆狼群 提交于 2019-12-21 02:43:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I would like to generate a graphical sitemap for my website. There are two stages, as far as I can tell: crawl the website and analyse the link relationship to extract the tree structure generate a visually pleasing render of the tree Does anyone have advice or experience with achieving this, or know of existing

Creating multiple Sitemaps in PHP

筅森魡賤 提交于 2019-12-20 14:44:06
问题 i have following problem, i generated the urls for the sitemap, in a array. So the array has 60000 entries. And google wants me to create 2 sitemaps cause the limit is 50000 entries each sitemap. How can i make this with php? I tried it, but have problems with the loop to stop and enter the other data in the other file. Here is my code sofar. // $data is array with the urls $count_array = count($data); $maxlinksinsitemap = 50000; $numbersofsitemap = ceil($count_array / $maxlinksinsitemap);