You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Yan Seiner <ya...@seiner.com> on 2013/09/08 17:02:30 UTC

[users@httpd] mod_rewrite and Short URLs in mediawiki

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
</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>

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

http://newmoon.seiner.lan/mediawiki/index.php/Main_Page

I would really like

http://newmoon.seiner.lan/wiki/Main_Page

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

</IfModule>

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?

Thanks!

-- 
Project Management Consulting and Training
http://www.ridgelineconsultingllc.com



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org