Dear All,

I'm new to MediaWiki, sorry if my question is trite but I still can't find answers in any page.

In MediaWiki API:Properties (http://www.mediawiki.org/wiki/API:Properties), we can know if a page is a redirect.

BUT
  • How to detect WHERE a page is redirected TO, and redirected FROM? 
  • How to check which page is the start, middle, or end of a redirect chain
 

From: http://en.wikipedia.org/w/api.php?action=query&list=backlinks&bltitle=Main%20Page&blfilterredir=redirects
To: http://en.wikipedia.org/w/api.php?titles=Mainpage&redirects&action=query

As for the second question, you'll just have to walk it.