KKnd   PmWikiZhCnUtf8 /
ChangePmWikiURL
SearchWiki
PmWikiZhCnUtf8.最近改变
编辑页面
页面修正

PmWiki is designed to be usable as a web site maintenance tool, and frequently administrators will want to be able to provide access to PmWiki pages without having "pmwiki.php" appear in the address bar of the users' browser windows. This page describes ways to have your PmWiki installation appear as a URL other than that of the pmwiki.php script itself. The examples below assume that a URL such as http://www.example.com/wiki is being set to refer to pmwiki.php on the www.example.com website.

There are two basic ways to accomplish this. First, if you have access to the web server configuration file, then simply adding the line

        Alias /wiki /path/to/pmwiki.php
to the configuration file will perform the alias for you.

If you don't have access to the configuration file, then a little bit of redirection is needed. First, create a file (not a directory) called "wiki" at the location where the webserver would normally access the "/wiki" URL. Often this is the web server's DocumentRoot directory, but it really depends on your site's configuration. Place the following PHP script in the wiki file:

        <?php chdir("/path/to/pmwikidir"); include("pmwiki.php"); ?>
In the script, replace /path/to/pmwikidir with the name of the directory containing pmwiki.php. Then, add the following lines to the .htaccess file in the same directory as the wiki file (create the .htaccess file if doesn't exist):
        <Files wiki>
        SetHandler application/x-httpd-php
        </Files>
This tells the webserver to treat the wiki file as a PHP script even though it doesn't end in .php. Now, requests for your wiki file will cause the web server to change to the directory containing pmwiki.php and execute it from there.

<< | PmWiki.DocumentationIndex | >>


编辑页面 - 页面修正 - WikiHelp - SearchWiki - 最近改变 - Printable Version
页面最后更新于 22 五月, 2003, 时间 04:01

©
copyleft by [email protected]
or
[email protected]