core: use z_context:abs_url/1 when redirecting to the main site url. Also make it a permanent redirect (301)
(cherry picked from commit f5e49fa52aeab0bf022713f9f16071a3324250ba)