Manual:Wiki in site root directory

Jump to navigation Jump to search

It is possible to use the root directory of a domain as the wiki directory and have the URLs look like this: "", but it is NOT recommended.


See the manual on short URLs.


  • Potential need for special rules.
    • You might need special rules for "robots.txt" or "favicon.ico", also for all wiki support files like skin images, extensions that load content from the "/extensions/" folder (such as CSS, JS, or images), and root scripts like api.php, thumb.php, and image_auth.php. This is all compatible with having your wiki in your website's root directory.
    • On the other hand, you might not. For instance the following in .htaccess on an Apache server seems to allow existing files and directories to be accessed as normal:
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
  • Periodically bugs pop up with various configurations and root URLs because MediaWiki was not designed for them. These are being tracked in task T34620; currently these are the outstanding issues:
    • task T34621, a root action path completely overrides $wgActionPaths.
    • task T40048, root article paths allow bypassing of nofollow and attacks on Special:Random.
    • task T113160, Super-short URLs are formed incorrectly for articles with titles starting with a slash.
  • Any scheme which does this is not supported by the MediaWiki developers. Use the configuration used by Wikipedia if you want to be on the safe side.