use correct relative paths when redirecting