[Mediawiki-l] Short URL reflecting wiki structure, no www

Sean O'Connor sean at transabled.org
Wed Aug 8 04:24:20 UTC 2007


Please bear with me, I'm really new to using wikimedia, and am not
familiar with .htaccess work.

I have searched the mailing list archives, but haven't found much.  I
have Googled, and have read several times the manual ('short URL' and
'using very short URL' in particular).  I have attempted several
variations of the suggestions found there, but I must be missing
something relatively simple...  Problem is, I have no idea what I'm

I am putting in a new wiki.  I have the install in the root of the
domain.  Currently, my urls look like:


First, I want to make sure that the www is never used in urls, and
that if someone types in www.mydomain.com, the page that loads is
mydomain.com.  I think have managed to stop jumping from www to no-www
between loging in by using $wgServer = "http://mydomain.com"; in my
localsettings.php page, but someone can still load a page by typing
the www in the address bar.  Any thoughts on this one?

Second, I'm wanting to get Short URL/Very Short URL working.  I'm
looking at using the .htaccess rewrite method, but all .htaccess
example base themselves on the wiki being installed in /wiki or /w and
I can't figure out how to get this to work?  Would anyone have a
working .htaccess sample for a wiki installed at /root ?

Finally, what I'd *prefer* would be to reflect the site's structure
within the URL, and end up with something like:


This obviously addresses those pages which belong in categories and/or
subcategories only.

Thank you for any assistance or pointers on this topic,


More information about the MediaWiki-l mailing list