Penguin
Note: You are viewing an old revision of this page. View the current version.

Apache lets you do cool things with rewrite rules.

DefineMe? AddToMe

On a related not I was mucking about with phpWiki and trying to get it to work the same way you have it set up. Ie, using path info based urls (eg, /wiki/!SomePageHere?) and I couldn't get it to work. I'd be interested to know how you set yours up.

in the index.php "config" file

define('SCRIPT_NAME', '/wlug'); define('DATA_PATH', '/phpwiki-1.3.3'); define('VIRTUAL_PATH', '/wlug');

% mkdir wlug % cd wlug % cat >.htaccess <<EOF

RewriteRule? (.*) /phpwiki-1.3.3/index.php/$1 [L?

RewriteEngine? On

EOF

For the CRCnet wiki I do it this way

  • In your docroot have two directories, one called wiki and another called phpwiki (or whatever) the wiki directory should have no files in it at the moment, the phpwiki directory should have the wiki source
  • In the wiki directory create a .htaccess file that looks like the following

Action x-phpwiki-page /phpwiki/index.php

SetHandler? x-phpwiki-page

DirectoryIndex? /phpwiki/index.php

  • Make sure that !AllowOverrides? is set appropriately to allow the .htaccess file to be used

I think that is all :)