Wordpress & mediawiki htaccess problem

wordpress

#1

I’ve got a wordpress blog installed in / and a mediawiki installed in /mywiki/

Currently my .htaccess looks like this:

RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [S=1] RewriteRule ^/mywiki/(.*)$ /mywiki/index.php?title=$1 [L,QSA]

BEGIN WordPress

RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/mywiki RewriteCond %{REQUEST_URI} !^Main_Page RewriteRule ^(.*)$ /index.php [L] # END WordPress

This URL works:
http://www.andyjdesign.com/mywiki/index.php?title=Work
This URL gets caught by the WordPress 404 page:
http://www.andyjdesign.com/mywiki/index.php?title=Main_Page
As does:
http://www.andyjdesign.com/mywiki/
And:
http://www.andyjdesign.com/mywiki/Main_Page

Any thoughts on how I can get these two to live in peace?


#2

The best option would be to place the specific mywiki rewrites in their own .htaccess file in the /mywiki directory.

.htaccess applies to to all files and subfolders below the directory it is placed in. To override any rules in subdirectories you should place those rules within their own .htaccess file in the sub directory in question.

I hope that makes sense, I’m not a .htaccess guru so but I’m pretty sure that should work.


Web Hosting Reviews | Get Around The Net Directory


#3

Well heres the flop after I figured it out:

  1. Request index.php
  2. Crash the php5.cgi module
  3. Look for incorrect_request.html (or something like that)
  4. Trigger a real 404
  5. Caught by WordPress

Upgraded to MediaWiki 1.9.0, problems solved…