[pmwiki-users] The return of CleanUrls

Hans design at softflow.co.uk
Mon Feb 27 05:46:22 CST 2006


Monday, February 27, 2006, 11:06:14 AM, Dominique wrote:
> Create a file name "wiki" and containing enough code to bootstrap your
> wiki as in:

>   <?php chdir('pmwiki'); include_once('pmwiki.php');

> and provide following directives into a @@.htaccess@@ file in the same
> directory:

>   <FilesMatch "^wiki$">
>     ForceType application/x-httpd-php
>   <FilesMatch>

I have been using this approach for a while in a farm setup.
My .htaccess file contains lines like

<Files wiki1>
SetHandler application/x-httpd-php
</Files>

<Files wiki2>
SetHandler application/x-httpd-php
</Files>

which works fine, instead of using FilesMatch and ForceType.
I don't know the difference to your suggestion, but thought I mention
it.

The associated field files look like this

<?php chdir("fields/wiki1"); include("../../farm/pmwiki.php"); ?>

The farm is structured this way:

root/
   .htaccess
   wiki1
   wiki2
   farm/
      pmwiki.php
      cookbook/
      local/
      pub/
      scripts/
   fields/
      wiki1/
         local/
         wiki.d/
         uploads/
      wiki2/
         local/
         wiki.d/
         uploads/
  
This works fine on hosting providers where I don't have access to the
server configuration. And I like it because it is very easy to rename
fields, and a clean directory structure.

Best, 
~Hans                           





More information about the pmwiki-users mailing list