Short URLs in MediaWiki on a localhost: Difference between revisions
Jump to navigation
Jump to search
(Created page with "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 h...") |
No edit summary |
||
| Line 15: | Line 15: | ||
</pre> | </pre> | ||
; In LocalSettings | ; In LocalSettings.php | ||
<pre> | <pre> | ||
## Base path to the directory containing the wiki; | ## Base path to the directory containing the wiki; | ||
Revision as of 09:16, 30 December 2016
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.php
## 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]