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.
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to update Direct Admin skin to Evolution Theme?

Here are very simple steps to update the DIRECT ADMIN skin to the Evolution Theme - 1. cd...

How to list all files under directory?

When there is no 'index.php' or 'index.html' file and you'd like to display all the files under...

How to run CGI script using any directory or /~username/cgi-bin?

If you would like to force Apache to allow CGI script then just follow below simple steps - 1....

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 upgrade mysql with custombuild 2.0?

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

Powered by WHMCompleteSolution