I would like to utilize "very short URLs", ie. without the "wiki/" sub-directory part of the URLs.
Following a fairly standard installation of MediaWiki 1.9.3, the output concerning standard short URLs was: * PHP server API is cgi; using ugly URLs (index.php?title=Page_Title)
I thereafter configured standard short URLs, including the standard wiki/ path, by the procedure documented at: http://www.mediawiki.org/wiki/Manual:Short_URL/wiki/Page_title
As suggested in the above article, I also moved the wiki installation directory away from the htdocs area, although it appeared to work fine, even when it resided the the htdocs folder. With a configuration as in the article, URLs such as http://example.com/wiki/Main_Page became fully functional. The entries in the server httpd.conf file and LocalSettings.php file were done as follows (replacing the example.com with a real domain).
1) The Apache server httpd.conf:
ServerName www.example.com <VirtualHost example.com> ServerAdmin campmaster@example.com User camper Group g1013 DocumentRoot /usr/home/example.com/htdocs AddHandler cgi-script .cgi .pl AddType vphp5 .php Action vphp5 /cgi-f/vphp5
# these lines were added for the wiki short URL set-up Alias /w/index.php /usr/home/example.com/wiki/index.php Alias /wiki /usr/home/example.com/wiki/index.php Alias /index.php /usr/home/example.com/wiki/index.php Alias /w/skins/ /usr/home/example.com/wiki/skins/ Alias /w/images/ /usr/home/example.com/wiki/images/ </VirtualHost>
2) In LocalSettings.php:
## The URL base path to the directory containing the wiki; ## defaults for all runtime URL paths are based off of this. $wgScriptPath = "/w"; $wgScript = "$wgScriptPath/index.php"; $wgArticlePath = "/wiki/$1"; $wgUsePathInfo = true;
In trying to override the 'wiki/' directory I experimenting using various method but without fully understanding the mod_rewrite syntax. For example, I tested by simply replacing:
Alias /wiki /usr/home/example.com/wiki/index.php
with:
Alias / /usr/home/example.com/wiki/index.php
.. while reflecting this in LocalSettings.php as:
$wgArticlePath = "/$1";
The server then returned the following error when viewed in a web browser:
"Not Found The requested URL /cgi-f/vphp5/ was not found on this server."
I also found a "very short URL" manual at http://www.mediawiki.org/wiki/Manual:Short_URL/Page_title_--_Aliasing_method...
However, I think the above manual relates mainly to Apache 2, while the version Apache I use is 1.3.34. Can anyone suggest a few ideas to try producing very short URLs, by configuration of the httpd.conf with root access on a pre apache2 server?
Many thanks in advance for any tips and tricks!
mediawiki-l@lists.wikimedia.org