Manual talk:Short URL/LocalSettings.php

Jump to navigation Jump to search

cgi hint[edit]

With CGI it is now possible to have Short URLs.

Add the two following lines to LocalSettings.php:

$wgUsePathInfo = true;
$wgArticlePath = "/wiki/index.php/$1"; (my installation of mw is in the subfolder /wiki)

Tested with PHP 5.2.6 CGI/FastCGI and Apache/2.2.9 (Unix) and MediaWiki 1.13.1 -- 21:20, 11 September 2008 (UTC)


Task: Use a subdomain and custom installation folder. Given http://foo.localhost landing page URL would resolve to http://foo.localhost/wiki/Main_Page with file path /var/www/foo/w/index.php/

I set up my Apache according to this documentation and follwed this manual for editig LocalSettings.php.

In server logs requests to http://foo.localhost were correctly redirected (file was found) but then I somehow "lost" the subdomain ending in http://localhost/wiki/Main_Page with a 404.

I could fix this by editing LocalSettings.php and set $wgServer = "http://foo.localhost"; 09:01, 7 November 2014 (UTC)

HOW to setup like ?[edit]

HOW to setup like ?