httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yan Seiner <>
Subject [users@httpd] mod_rewrite and Short URLs in mediawiki
Date Sun, 08 Sep 2013 15:02:30 GMT
I have an installation of apache 2.2 (Ubuntu 12.04LTS) and mediawiki 1.21.

I am trying to get short URLs working.  I've configured mod-rewrite
before on other systems and I can't find anything wrong with any of the
various setups I've tried, but mod_rewrite is being silently ignored.

Here's my mediawiki setup:

Alias /mediawiki /var/lib/mediawiki

<Directory /var/lib/mediawiki/>
    Options +FollowSymLinks
    AllowOverride All
    order allow,deny
    allow from all

# some directories must be protected
<Directory /var/lib/mediawiki/config>
    Options -FollowSymLinks
    AllowOverride None
<Directory /var/lib/mediawiki/upload>
    Options -FollowSymLinks
    AllowOverride None

This works fine, except that I have long URLs in the form of


I would really like


I've tried

root@NewMoon:/etc/apache2/mods-enabled# cat rewrite.conf
<IfModule mod_rewrite.c>

RewriteEngine On
RewriteRule ^/wiki(/.*)?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
RewriteLog "/var/log/apache2/rewrite.log"
RewriteLogLevel 5


and various other places.  If I take out the Alias in the mediawiki
file, I get 404 errors.

Nothing is written in the rewrite log.

But if I intentionally break the rewrite.conf, I get an error, so I know
apache is reading it, but it is not rewriting the URL ever.

I've tried adding the rewrite rules in /var/www/.htaccess,
/var/lib/mediawiki/.htaccess, no joy.

Any hints on where I can look?


Project Management Consulting and Training

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message