[Mediawiki-api] Forbidden, but why?
Roan Kattouw
roan.kattouw at home.nl
Mon Jul 14 10:03:16 UTC 2008
Aelxander Schwarz schreef:
> Hey NG.
> I tried this:
>
> http://wiki.local/wiki/api.php?action=query&format=xml&meta=userinfo&uiprop=blockinfo|groups|rights|hasmsg
>
> But I get only an Forbidden Exception:
>
> API must be accessed through the primary script entry point.
>
> I have no idea. Have you one?
>
> Sincerely Alex
Do you have any rewrite rules or stuff like that? Please ensure that
you're accessing api.php at its proper URL (i.e. "where it actually is",
without the rewrites). You can check this by editing a page and looking
at the URL, which will be something like
http://wiki.local/w/index.php?action=edit&title=Foo . Replace index.php
with api.php and see if that works. If it still doesn't, you need to
'expose' your wiki root directory as follows:
- Make the wiki root (the directory that contains index.php and api.php)
accessible as e.g. http://wiki.local/w/
- Use an Alias or a rewrite rule to rewrite /wiki/Foo to
/w/index.php?title=Foo
Roan Kattouw (Catrope)
More information about the Mediawiki-api
mailing list