kernel: more fixes for https redirect and 404 issues