If the site is PHP, for example, then that page would just have something like:
header("Location: $_GET('returnUrl')", true, 301);
exit();
Basically the server just tells the browser "hey, this is a 301 response, and the location is at this URL." There's no list of rules anywhere that need to...