For example, I have done it here: https://test.wikipedia.org/wiki/Special:BlockList?wpTarget=Drwpb
I am assuming this is not desired because:
- You cannot do this via the API (https://www.mediawiki.org/wiki/API:Block shows allowed values)
- Tasks like T208355 suggest it should not be possible to block users from "Special:" pages
The mediawiki instance will need to have: "$wgEnablePartialBlocks = true;"
- Go to Special:Block
- Type in a valid user (you won't get completion without JS)
- Select the "Partial" radio button
- In the "Namespaces" input type "-1"
- Choose an expiration (you need to type in a value, doesn't seem to matter)
You can see the settings of the block you have just set in Special:BlockList.
My local VM:
MediaWiki 1.33.0-alpha (1900a8a) 15:26, 21 February 2019