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

Chee-Yang Chau cychau at gmail.com
Tue May 29 11:35:09 UTC 2012


You are right...

On Mon, May 28, 2012 at 9:17 AM, Krinkle <krinklemail at gmail.com> wrote:

> On Mon, May 28, 2012 at 2:57 AM, Chee-Yang Chau <cychau at gmail.com> wrote:
>
> > I found the solution, in .htaccess:
> >
> > RewriteEngine On
> >
> > RewriteCond %{SCRIPT_FILENAME} -f [OR]
> > RewriteCond %{SCRIPT_FILENAME} -d
> > RewriteRule .* - [L]
> >
> > RewriteRule ^wiki/(.+)$ wiki/index.php/$1 [L,QSA]
> >
> >
> This means you can't have articles with any of these names:
>
> * [[bin]]
> * [[docs]]
> * [[extensions]]
> * [[images]]
> * [[languages]]
> * [[FAQ]]
> * [[Maintenance]]
> * [[Tests]]
>
> ..and maybe more.
>
> As documented [1], you should never use the same name for a virtual
> directory and a real directory. Rename your /wiki/ directory to /mw, /w/ or
> /mediawiki or whatever. Then use /wiki/$1 as the article path that readers
> will see.
>
> Then there are no conflicts.
>
> -- Krinkle
>
> [1] https://www.mediawiki.org/wiki/Manual:Short_URL
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>



-- 
Best regards,
Chau Chee Yang


More information about the MediaWiki-l mailing list