How to forward the website to another URL?

Forwarding the website to another URL -

1. Using index.php file -

1. Create the page as index.php file under public_html directory.
2. Add below code -
<?php
header("Location: http://forwarding_page_name/to/go.html");
?>

2. Using htaccess file -

1. Create .htaccess file under public_html directory.
2. Add below code -
Redirect 301 / [b] http://forwarding_page_name/to/go.html[/b]

You can opt to any of the below method.

Note -
You will need to replace the name of website in the 'http://forwarding_page_name/to/go.html' where you would like to forward your site.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to upgrade mysql with custombuild 2.0?

Before doing any updates of MySQL be sure to create full backups of all databases.Steps to...

How to update Apache to latest version?

Steps to update Apache to latest version -1. Please check the current version of Apache using...

How to install xmlrpc?

Installing xmlrpc module on Directadmin. Seems simple isn't it ? Might find many articles on the...

How to upgrade the php from 5.4 to 5.6?

If you are running php 5.4 on the server and want it to be upgraded to 5.6 . Additionally, your...

How to reset and retrieve directadmin admin password using shell?

Steps to reset the direct admin password -1. Login to SSH with root user -#passwd admin 2. This...

Powered by WHMCompleteSolution