You must specify a form name in the URL; the URL should look like 'Special:RunQuery/<form name>'.
MediaWiki:Sf runquery badurl
From AIRWiki
You must specify a form name in the URL; the URL should look like 'Special:RunQuery/<form name>'.