core: use z_context:abs_url/1 when redirecting to the main site url. Also make it a permanent redirect (301)
core: removed some ununsed var warnings.