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

Platonides Platonides at gmail.com
Sat May 26 23:16:20 UTC 2012


On 24/05/12 03:00, Chee-Yang Chau wrote:
> 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?  

Why do you want to do so?

> Can I enjoy short url too ?
You could, but it's hacky and not recommended.


> This is what I have tried:
(...)
> When I access my wiki site:  http://localhost/wiki/
> 
> I get a page without skin.  Is there anything else I miss in rewriterule?

There are two folders to take into account when you use short urls.
One is the folder containing all mediawiki files, index.php, api.php,
skins/, includes/...
The other is the virtual folder where you serve the articles, usually wiki/

Your problem is that when your browser goes to wiki/... to fetch the
CSS, a image, javascript..., the rewrite rule is returning a wiki page
(due to the rewrite) instead of the real file.

You should use two different urls there to avoid any collision.
What's your problem with using two urls? (they don't need to be called
wiki/ and w/)





More information about the MediaWiki-l mailing list