publish: Fix redirection issue

generated from commit 3edf2e7cfc4b9d94168d95d93513b85e6d4b6309