Date: 21 January 2008
- I hate the default pmwiki messy url (addresses) like
http://www.mathcasts.org/mtwiki/pmwiki.php?n=Main.Homepageand want standard addresses like
In geekese, this is called "clean urls". Official PmWiki Help Page
- I had managed to get clean urls on this (my dreamhost site) without too much trouble, but
- I could not get clean urls to work on my startlogic sites; with these steps I did.
1. I put my wiki one step into the root html folder (not necessary, see update below*).
2. In my backup of my wiki (on my harddisk) in the /local folder, I opened the file config.php and
$EnablePathInfo = 1;.
If you are in dreamweaver, the line will turn from orange (comment) to black (a real line).
$ScriptUrl = 'http://www.emathforall.com/wiki';.
There is a line above this with
$ScriptUrl = 'http://www.emathforall.com/wiki/pmwiki.php';.
I just left it there; but probably I should "comment" it by adding "##" in front of that line.
3. I opened Notepad (you can use any text editor)
# Use mod_rewrite to enable "Clean URLs" for a PmWiki installation. RewriteEngine On # Define the rewrite base. RewriteBase /wiki # Send requests without parameters to pmwiki.php. RewriteRule ^$ pmwiki.php [L] # Send requests for index.php to pmwiki.php. RewriteRule ^index\.php$ pmwiki.php [L] # Send requests to pmwiki.php, appending the query string part. RewriteRule ^([A-Z0-9\xa0-\xff].*)$ pmwiki.php?n=$1 [QSA,L]
BTW: I always write internal links using a forward slash and never a dot -
[[glossary/triangle|mylinktext]] and not
Date: 25 January 2008 Not necessary to put wiki in root; it works even in deeper folder.
|Up one level|