currently translating
DokuWiki 可以自動建立 Google Sitemap。要開啟這個功能請設定 'sitemap option'.
在開啟這個功能之後, DokuWiki 會試著在你 DokuWiki 的根目錄中建立一個名稱為 sitemap.xml.gz 的 sitemap 。你必須確定 DokuWiki 可以寫入這個檔案。如果根目錄無法開啟寫入權限,你必須在根目錄下建立一個空的檔案,取名為 sitemap.xml.gz ,並設定好權限。
在建立一個新的sitemap之後,DokuWiki會在背景執行http://www.google.com/webmasters/sitemaps/ping?sitemap=<your_sitemap_url>,試著 “ping” Goole ,通知它有新的 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” 的回應,它會取消這個認證。.htaccess (example below).
Rewrite example (Apache):
RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.domain\.org$ [NC] RewriteRule ^(.*)$ http://www.domain.org/$1 [R,L]
延伸閱讀:
To launch it manually, and debug it, try : http://yourserver/dokuwiki/lib/exe/indexer.php?debug=1Dokuwiki-20061106. I've done. By I have this answer:
runIndexer(): started metaUpdate(): started runSitemapper(): started runSitemapper(): using sitemap.xml.gz
here process hangs-up with no other output.
No sitemap.xml.gz is created.
Solved creating a new empty sitemap.xml.gz in dokuwiki root directory. It seems needed even if dokuwiki rootdir is writeable for user apache.
I thing may be useful a better output from debug.
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported