Knowledgebase
PHP and HTML redirects Print this Article
If you do not wish to use the .htaccess file to redirect your visitors, you can use another option - a PHP or an HTML file which will perform the actual redirection. Below are examples for both programming languages:
For PHP, create a file (index.php for example) and add the following lines in it:
<?php
header( 'Location: http://www.yoursite.com/redirect_location' ) ;
?>
For HTML, create a file (index.html for example) with the following content:
<META HTTP-EQUIV="Refresh"
CONTENT="0; URL=http://www.yoursite.com/redirect_location">
Here you have the option to delay the redirect by increasing the CONTENT variable. For example CONTENT=5 will delay the redirect for 5 seconds.
Was this answer helpful?
Related Articles
Updating DNS at NetworkSolutions.com
This demo assumes you have a domain name registered through NetworkSolutions.com, and starts from...
This demo assumes you have a domain name registered through NetworkSolutions.com, and starts from...
Updating DNS at StarGate.com
This demo assumes you have a domain name registered through StarGate.com, and starts from the...
This demo assumes you have a domain name registered through StarGate.com, and starts from the...
Updating DNS at Register.com
This demo assumes you have a domain name registered through Register.com, and starts from the...
This demo assumes you have a domain name registered through Register.com, and starts from the...
Updating DNS at Netfirms.ca
This demo assumes you have a domain name registered through Netfirms.ca, and starts from the...
This demo assumes you have a domain name registered through Netfirms.ca, and starts from the...
Updating DNS at NameCheap.com
This demo assumes you have a domain name registered through NameCheap.com, and starts from the...
This demo assumes you have a domain name registered through NameCheap.com, and starts from the...