1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Redirecting the site's homepage (or any other web page) to a different page or another website
You have several options to redirect your visitors to another address.
Actions to carry out
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=http://www.domain.xyz">
If your page has a .php extension:
<?php header( 'Location: http://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 in /web:
RewriteEngine On RewriteRule ^(.*)$ http://www.domain.xyz/$1 [R=301]
Find out more
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 http://new-page.xyz
Redirectpermanent, Redirect permanent and Redirect 301 are equivalent commands.