Dr. Volker Riediger wrote:
Dear folks,
I need a solution for the following problem:
In my MediaWiki, there was a huge tree of pages named like
...mywiki/a ...mywiki/a/b ...mywiki/a/b/c ...mywiki/a/b/d ...mywiki/a/e ...mywiki/a/e/f ...mywiki/a/e/g and so on.
For some reason, I had to delete all those pages below "a" (done by maintenance/deleteBatch.php).
Now, I'd like to display a single information page if anybody uses an outdated deep link instead of the usual message "There is currently no text in this page, you can search for this page title in other pages or edit this page."
But I don't want to create 500+ redirects... Is there another way to show "mywiki/a" when sombody uses "mywiki/a/b/c"?
This means, each page with prefix "a/" shoud be redirected to "a".
You can check on mediawki:noarticletext with the proper parserfunction if you are at myqiki/a subtree, to show a different message. You could also perform a redirect at .htaccess level.