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