How to redirect to a relative URL in JavaScript?

This works in the same way as redirecting to any URL in javascript.