When a website is redirected to another site, it may be necessary to redirect the home site to a local page instead of the new URL. This can be to show redirect information or just show a logo on the old web site. The redirect info can be written in the .htaccess file as

RedirectMatch 301 ^/$ URL

where the URL is the URL or page to direct to. You would place it in .htaccess similar to the code below.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RedirectMatch 301 ^/$ https://www.website.com/home.php
Print Friendly, PDF & Email
Translate »