咖啡館日誌
The server is temporarily unable to service your request due to the site owner reaching his/her bandwidth limit. Please try again later.

02/2007 01/2006 12/2005 11/2005 09/2005 08/2005 07/2005 06/2005 05/2005 04/2005 02/2005 12/2004 11/2004 10/2004 09/2004 08/2004 06/2004 05/2004 04/2004 03/2004 01/2004 12/2003 11/2003
這是內建 MacOS X 佈景主題的 PhpWiki

網址改寫的作法:

假設將 phpwiki 安裝在主機上的 /scripts/phpwiki/ 目錄下,則每一個頁面的網址將變成 http://www.sharksbeer.com/scripts/phpwiki/index.php/SomePage 。這實在是非常冗長,又令人厭惡。

如果可以改成 http://www.sharksbeer.com/wiki/SomePage呢?豈不妙哉?作法如下:

建立一個名為 wiki 的空目錄,在裡面放置一個 .htaccess 檔案,內容是:
Action x-phpwiki-page /scripts/phpwiki/index.php
SetHandler x-phpwiki-page
DirectoryIndex /scripts/phpwiki/index.php

然後開啟 index.php,將裡面的參數 VIRTUAL_PATH 設為 '/wiki' 即告完成。
這一行:
if (!defined('VIRTUAL_PATH')) define('VIRTUAL_PATH', '/wiki');

改成這樣,前面的雙斜線註解符號記得去掉。

link

Powered by Blogger