Table of Contents

currently translating FIXME

Google Sitemap

DokuWiki 可以自動建立 XML Sitemap。適用於各大搜尋引擎,例如:Google,Yahoo and Microsoft。

要開啟這個功能請設定 'sitemap option'。在開啟這個功能之後, DokuWiki 會試著在你 DokuWiki 的根目錄中建立一個名稱為 sitemap.xml.gz 的 sitemap 。你必須確定 DokuWiki 可以寫入這個檔案。如果根目錄無法開啟寫入權限,你必須在根目錄下建立一個空的檔案,取名為 sitemap.xml.gz ,並設定好權限。

在建立一個新的sitemap之後,DokuWiki 經由 “ping” ,通知下列搜尋引擎有新的 sitemap 了。

備註:

權限設定

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.

Sitemap Validity

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]

延伸閱讀

1)
See permissions on tips about permission setting