Redirect_to for pages

I whish there were a redirect_to for pages (not only sections) and that this also accepts redirect to an external website. Example:

redirect_to = "https://example.com"

It could automatically insert

<script>window.location.replace("https://example.com");</script>

in the content for example.

There are aliases but not for the markdown page itself

I know the aliases, but they can not redirect outside the website. (my post was more the documentation of a potential feature than a real feature request)