currently translating
DokuWiki 可以自动建立 XML Sitemap。适用于各大搜寻引擎,例如:Google,Yahoo and Microsoft。
要开啟这个功能请设定 'sitemap option'。在开啟这个功能之后, DokuWiki 会试着在你 DokuWiki 的根目录中建立一个名称為 sitemap.xml.gz 的 sitemap 。你必须确定 DokuWiki 可以写入这个档案。如果根目录无法开啟写入权限,你必须在根目录下建立一个空的档案,取名為 sitemap.xml.gz ,并设定好权限。
在建立一个新的sitemap之后,DokuWiki 经由 “ping” ,通知下列搜寻引擎有新的 sitemap 了。
备註:
http://your.site.tld/dokuwiki_basedir/是你的网站,首先建立一个 Google 建议的档案,如http://your.site.tld/dokuwiki_basedir/googlexyz.html(使用者必须可读)。然而,為了让这个功能可以运作,你必须也同时开啟 'send404'。原因是因為对于不存在的页面, DokuWiki 预设回传 “200 OK”。Google 对于不存在的页面预期的回应用是 “404 Not Found”。所以当 Google 测试一个虚构的网页(如 http://your.site.tld/dokuwiki_basedir/noexist_xyz.html),然后得到 “200 OK” 的回应,它会取消这个认证。
To be able to create a sitemap, the Webserver needs to have write access to the sitemap file. The easiest way to make sure it has, is to create an empty sitemap.xml.gz file and change its permissions accordingly1).
If your sitemap won't be created you can try to get some debug output from the indexer by calling http://yourserver/dokuwiki/lib/exe/indexer.php?debug=1 in your browser.
To force your sitemap to be re-created, try temporarily setting the sitemap option to a large, negative value.
Sitemaps are bound to a domain name. If your sitemaps contains URLs of the form http://domain.org, the sitemap will not be valid when pulled from http://www.domain.org and vice versa. To make sure a canonical URL is used you can either configure the baseurl setting or redirect “mismatching” URLs via another rewrite rule in your .htaccess:
Rewrite example (Apache):
RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.domain\.org$ [NC] RewriteRule ^(.*)$ http://www.domain.org/$1 [R,L]