[pmwiki-users] PmWiki and Wordpress on same domain
Jan Erik Moström
lists at mostrom.pp.se
Tue Jan 22 11:33:35 CST 2008
Jan Erik Moström <lists at mostrom.pp.se> 08-01-22 17.33
As requested: here is what I did to fix it:
+ I had a pretty standard WP installation with permalinks set to the
standard <http://www.example.com/2008/01/22/some-post/> format.
This generates a .htaccess file that looks like this
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
+ I then installed a PmWiki that I had started to configure in
in a 'wiki' sub-folder
+ My problem was that when I tried to access
<http://www.example.com/wiki/> I got an error message from WP
telling me that the page didn't exist
+ This is where I made my mistake: I thought that the problem
was with WordPress and I got seriously confused since the line
'RewriteCond %{REQUEST_FILENAME} !-d' should prevent WP
from doing a rewrite and send it to PmWiki instead.
The *real* problem was that I had started to configure PmWiki
and the .htaccess file I created then was interfering with
the path I was trying to access resulting in the error message
I saw.
+ When I deleted the .htaccess file in the 'wiki' dir
everything started to work correctly.
+ To get clean URLs in both WP and PmWiki I then used the standard
clean URL recipe and added this .htaccess file to the wiki dir
RewriteEngine On
RewriteBase /wiki
RewriteRule ^$ pmwiki.php [L]
RewriteRule ^index\.php$ pmwiki.php [L]
RewriteRule ^([A-Z0-9\xa0-\xff].*)$ pmwiki.php?n=$1 [QSA,L]
That's it. So the hours spent looking at WPs docs turned out to be
a simple case of looking at the wrong file.
jem
--
Jan Erik Moström, www.mostrom.pp.se
More information about the pmwiki-users
mailing list