I've got a Drupal 6 site running at webroot, and a MediaWiki wiki running at webroot/wiki. I can access the wiki fine by going to wiki.webroot, but when I try to access it using the path webroot/wiki the server interprets this as a Drupal 6 path: how do I get the server to interpret this as a directory? I'm guessing this is something to do with htaccess?

1 Answer 1


So, your drupal site lives at webroot, and your wiki lives at webroot/wiki? First thing i would suggest is to put your wiki outside your drupal root and creating a separate virtual host. You're asking for trouble with your current setup.

The .htaccess file that ships with Drupal should properly be treating webroot/wiki as a directory, if it exists. See https://stackoverflow.com/questions/15879029/dont-understand-rewritecond-request-filename-f-and-d

If it just won't work for you, update Drupal's .htaccess to explicitly add your wiki path:

RewriteCond %{REQUEST_URI} ^/wiki

Put this right before:

RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Your rewrite section will look like this (comments elided):

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_URI} ^/wiki
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.