(fixes #3156, BP from #3073) fixed to redirect considering include path
(refs #3156, BP from #3073) extract redirect logic to private method