![]() |
Edit Page Search Site Recent Changes: All | Pm Wiki |
Pm Wiki is designed to be usable as a web site maintenance tool, and frequently administrators will want to be able to provide access to Pm Wiki pages without having "pmwiki.php" appear in the address bar of the users' browser windows. This page describes ways to have your Pm Wiki 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 three 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 <?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.
A third method is to just rename "pmwiki.php" to a more suitable name, for instance "do.php". If you're going to use the webalizer web log analysis, please don't rename "pmwiki.php" to "index.php". Webalizer 'strips' urls after the 'index.' part, thus effectively destroying all page referrals. For instance: access to '/index.php/Main/Abc' and '/index.php/Main/Xyz' are both referred to as '/', with two counts. << Local Customizations | PmWiki.Documentation Index | Custom Headers And Footers >> | ||||||||||||||||||||||
| ||||||||||||||||||||||