1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Redirecting the site's homepage (or any other web page) to a another page or website
This guide explains how to redirect your visitors to another address once they have arrived at your website hosted by Infomaniak.
Paste this line of code between the <head> and </head> tags of your index page. Replace Time with the time in seconds or 0 so that redirection occurs immediately:
META http-EQUIV="Refresh" CONTENT="Temps; url=https://www.domain.xyz">
If your website page has a .php extension, insert this header call function at the very top of the file:
<?php header('Location: https://www.domain.xyz'); ?>
This setting will redirect absolutely all the traffic sent to your site (regardless of the page called) towards another address. Here are the rules to paste into the .htaccess file of your root directory:
RewriteRule ^(.*)$ https://www.domain.xyz/$1 [R=301]
A variation of the 3rd case presented above (redirection via .htaccess) enables you to target the page that must be redirected. E.g.:
Redirect permanent /old_page.html https://new-page.xyzRedirectpermanent, Redirect permanent and Redirect 301 are equivalent commands.