Added check for relative root on redirect