Thanks Daniel, that helps. I now have the Apache config code from the Redwerks code generator (which is brilliant for a novice like me):
RewriteEngine On
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
RewriteRule ^/?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?mediawiki/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/mediawiki/thumb.php?f=$1&width=$2 [L,QSA,B]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?mediawiki/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/mediawiki/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
...and I have the instruction: "Apache config: This configuration is meant to go the same block as whatever VirtualHost or other directive you have your wiki's DocumentRoot, ServerName, etc... already defined in." I presume this means I have to put the code into one of the blocks in etc/mediawiki/apache.conf
which, in my case, looks like this:
# Uncomment this to add an alias.
# This does not work properly with virtual hosts..
Alias /mediawiki /var/lib/mediawiki
<Directory /var/lib/mediawiki/>
Options +FollowSymLinks
AllowOverride None
order allow,deny
allow from all
</Directory>
# some directories must be protected
<Directory /var/lib/mediawiki/config>
Options -FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/lib/mediawiki/upload>
Options -FollowSymLinks
AllowOverride None
</Directory>
So I paste in the Redwerks code into the first directory block (because I am not sure whatelse to do) and go to etc/mediawiki/LocalSettings.php
and add the extra lines but I find that when I go back to my wiki I have correctly formed short urls http://www.mydomain.com/wiki/Main_Page
but I now get a 404 Not Found page error.
Any suggestions?