PmWikiZhCnUtf8 / ChangePmWikiURL |
SearchWiki PmWikiZhCnUtf8.最近改变 编辑页面 页面修正 |
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.phpto 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 | >>