inc/parsers/redirection.php
If the first line of the page is #REDIRECT, the page is redirected to the link that follows.
The exact behaviour depends on the action.
- If the action is view and the parsed wiki is the wiki that was also requested, a 301 permanent redirection Header is sent with the new URL and the scripts ends here.
- In all other cases, a new wiki is created with the new name.
This is important, because header redirection should not use the header approach if the parsed wiki is included by another wiki.
Note that #REDIRECT and #DISPLAYNAME are mutually exclusive.