I would think that code would create an endless redirect, resulting in an error.
Try this instead, it’s guaranteed to work.