Rotating object to another objects rotation [C#]

Hi!
A little background:
I have asked this question before and i thought it worked but now it doesn’t work on some situation.
I want to teleport my player to another place when he enters the portal and rotate him to thew portals exit.
So when my exit portal is on the ground the player exits and is turning upwards(z = 270)!
Code:

using UnityEngine;
using System.Collections;

public class StepThroughPortal : MonoBehaviour
{

	public GameObject otherPortal;
	public GameObject player;

	Quaternion rotate;
	
	void Start()
	{
		//rotate = Quaternion.LookRotation(otherPortal.transform.forward);
	}
	void Update()
	{

	}
	public void Interact(Transform collidedObject)
	{
		Debug.Log("something hit the portal");
		collidedObject.position = otherPortal.transform.position + otherPortal.transform.forward;
		collidedObject.rotation = Quaternion.LookRotation(otherPortal.transform.forward);
		TrackVelocity velocityScript = collidedObject.GetComponent<TrackVelocity>();
		if (velocityScript != null)
			collidedObject.GetComponent<Rigidbody>().velocity = Quaternion.FromToRotation(transform.forward, -otherPortal.transform.forward) * velocityScript.Velocity;
	}
	void OnCollisionEnter(Collision collidedObject)
	{
		Interact (collidedObject.transform);
	}


}

Special request for help: @dhore who have helped me in the previous question greatly!
Thanks in advance.
Ethan

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TeleportHandler : MonoBehaviour {
    public Transform otherPortal;
    private TeleportHandler portal;
    [HideInInspector]
    public bool ready = true;
	// Use this for initialization
	void Start () {
        portal = otherPortal.GetComponent<TeleportHandler>();
        Debug.Log(transform+" to "+portal);
        ready = true;
	}
	
	// Update is called once per frame
	void Update () {
		
	}
    private void OnTriggerEnter(Collider other)
    {
        Debug.Log("Enter");
        ready = false;
        if (!portal.ready) return;
        Debug.Log("Transfer");
        Vector3 delta = new Vector3(transform.position.x - other.transform.position.x, transform.position.y - other.transform.position.y, transform.position.z - other.transform.position.z);
        other.transform.position = new Vector3(otherPortal.position.x - delta.x, otherPortal.position.y - delta.y, otherPortal.position.z - delta.z);
        other.transform.Rotate((Quaternion.Inverse(transform.rotation) * Quaternion.Inverse(otherPortal.rotation)).eulerAngles);
    }
    private void OnTriggerExit(Collider other)
    {
        Invoke("Reset", 0.1f);
    }
    private void Reset()
    {
        ready = true;
    }
}

Sorry for the lengthy code, that was what I used. However, it does not rotate inertia correctly. See <a href="https://answers.unity.com/questions/1574323/how-to-rotate-a-gameobjects-inertiahow-to-rotate-g.html">My Question</a>