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 short URLs was:
* PHP server API is cgi; using ugly URLs (index.php?title=Page_Title)
I thereafter configured standard short URLs, including the wiki/ path, by
the procedure documented at:
http://www.mediawiki.org/wiki/Manual...iki/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 in 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 the wiki
configuration file named LocalSettings.php file were done as follows
(replacing example.com with a real domain):
1) In 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 experimented using various
methods 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 the LocalSettings.php wiki config file 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...d--Root_access
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 and
produce very short URLs by a rewrite configuration in httpd.conf on a
pre-apache2 server?
Many thanks in advance for any tips and tricks!