Issue #2373543: refine redirect logic so only one file redirects and after publish redirected to view page