This is an old revision of this page, as edited August 16, 2009, 2:34 PM by pegasus(contribs). It may differ significantly from the current revision.
If your wiki and your forum appear in different folders (e.g. /forums/ and /wiki/), you will need to edit up to 2 .htaccess files.
This is only practical if Simplify Wiki Links is enabled. If it isn't use the .htaccess instructions for Wiki Under the Forum Root.
Step 1
If you the setting Wiki PHP File is set to 'showwiki', you can skip this step. Otherwise, edit the .htaccess file in your forum root.
If you have not already enabled mod_rewrite in the file, you can do so by adding the following line:
Code:RewriteEngine On
Add the following code:
Code:RewriteBase /forums/
RewriteRule ^FILE.php showwiki.php [L,QSA]
Save the .htaccess file.
Step 2
Edit the .htaccess file in your document root.
If you have not already enabled mod_rewrite in the file, you can do so by adding the following line:
Code:RewriteEngine On
Add the following code:
Code:RewriteBase /
Treat PATH as the directory path relative to your document root.
In the case: http://www.example.com/forums/
PATH is 'forums', with no leading or trailing slash.
If the value of Wiki PHP File is not 'showwiki', add the following line:
Code:RewriteRule ^PATH/FILE.php(.*)?$ PATH/showwiki.php$1 [L,QSA]
Add the following lines:
Code:RewriteRule ^PATH/showwiki.php?VAR=(.*)$ FILE/$1 [/L,R=301]
RewriteRule ^FILE/DEFAULT:(.*)$ FILE/$1 [L,R=301]
RewriteRule ^FILE/(.*)?$ PATH/showwiki_proxy.php [L,QSA]
Save your .htaccess file, and your wiki URLs should work smoothly.