User:NNikkhoui (WMF)/Mediawiki Background Info/Special Pages

Special Page Info (copied from comment from Timo's code review)

  • Special pages cannot be a WikiPage redirect, and thus indeed are fine to be exempted from this redirect target resolving code path.
  • Special pages can respond with HTTP redirects. E.g. Special:Permalink/1 and Special:Edit/Foo redirect to index.php queries (not a page), Special:MyPage redirects to User:Foo (a wiki page), and Special:MyContributions redirects to Special:Contributions/Foo (a special page).
  • These however are personalised and would not be safe to resolve within the REST API (they would point to the wrong destination for the current viewer). But also more generally would be counterproductive since these redirects are meant to be used as-is. E.g. if I use the API in a widget that creates a link to Special:MyPage, my intention is to create a link that goes to Special:MyPage, to be experienced anew by each person clicking that link. It is not the intention to help me find my own user page and then create a static link to that.