[Mediawiki-l] .htaccess/rewrite help for subdomain

Helmut Hullen HHullen_BS at T-online.de
Mon May 15 12:50:00 UTC 2006


Hallo, Michelle,

Du meintest am 14.05.06 zum Thema [Mediawiki-l] .htaccess/rewrite help for subdomain:

> I managed to get .htaccess Rewrite to work and yield pretty URL's
> for a basic setup like this:

> www.mydomain.com/wiki/index.php/Main_Page

[...]

> Does the .htaccess file need to be in the wiki directory rather
> than the root directory? I assume so since it's like a different
> site. I can't seem to get it to recognize where the w/ directory
> is. For example, this htaccess in the wiki directory yields the
> correct URL but a 404 error on the wiki:

> RewriteRule ^index.php/(.*)$ /w/index.php?title=$1 [L,QSA]

I have the following directory structure and ".htaccess" file:

------------------------------------
Directory:

drwxr-xr-x   14 xxxxx    vmusers      4096 May 15 09:40 mediawiki-1.6.1
lrwxrwxrwx    1 xxxxx    vmusers         4 Apr  1 11:41 wiki -> Wiki
lrwxrwxrwx    1 xxxxx    vmusers        15 Apr  6 15:04 Wiki -> mediawiki-1.6.1


File ".htaccess" in "mediawiki-1.6.1"

# if you want to use mod_rewrite, set this 'On'
RewriteEngine On

# the path to your installation
RewriteBase /Wiki/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d


RewriteRule ^(.*)$ 	index.php?title=$1 [L,QSA]
#

------------------------------------

You ca see the result at

                http://arktur.de/Wiki

A minor thing: when I go from the main page to "5.6 Zusatzprogramme"  
and there to "openVPN", I see the long URL.

   http://arktur.de/Wiki/index.php?title=Zusatzprogramme:openvpn


But when I delete

        index.php?title=

all works fine.


Viele Gruesse!
Helmut





More information about the MediaWiki-l mailing list