core: set the zotonic_dispatch_path to the path before an internal resource redirec.