[Mediawiki-l] Short URL using rewriterule without rename wiki to w

Chee-Yang Chau cychau at gmail.com
Thu May 24 01:00:25 UTC 2012


Hi,

Here is my environment:

1. Fedora Core 16
2. Apache httpd 2.2.22
3. MediaWiki 1.19

Most of the short url solution provided are using renaming method: e.g.:
wiki to w

What if I want to stay with wiki directory without renaming?  Can I enjoy
short url too ?

This is what I have tried:

File: LocalSettings.php:

  $wgArticlePath = "/wiki/$1";
  $wgUsePathInfo = true;

File: .htaccess

  RewriteEngine On
  RewriteRule ^wiki/index.php - [L]
  RewriteRule ^wiki/(.*)$ wiki/index.php/$1 [L,QSA]

When I access my wiki site:  http://localhost/wiki/

I get a page without skin.  Is there anything else I miss in rewriterule?

-- 
Best regards,
Chau Chee Yang


More information about the MediaWiki-l mailing list