Short URLs in MediaWiki on a localhost
In my local installation of MediaWiki, the scripts are in <C:\wamp\www\mediawiki>.
I want the short URL to be <http://localhost/wiki>, followed by page names.
- In httpd.conf
alias /wiki /wamp/www/mediawiki/index.php
<Directory "/wamp/www/mediwiki">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
- In LocalSettings
## Base path to the directory containing the wiki; ## Cf. http://www.mediawiki.org/wiki/Manual:Short_URL $wgScriptPath = "/mediawiki"; $wgArticlePath = "/wiki/$1"; $wgUsePathInfo = true;
- This .htaccess may not be strictly necessary, but it doesn't hurt.
## http://www.mediawiki.org/wiki/Manual:Short_URL/Apache
# Enable the rewrite engine
RewriteEngine On
# Redirect / to Main Page
RewriteRule ^/*$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]