How to create a redirect (PHP)

How to create a redirect (PHP)...

If you want to have your domain redirect to another page or folder on your domain you can create an index.php page and enter the following code...

<?php
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: /shop/');
?>


In this example if you put the index.php file in your root folder of www.domainname.com any visitors would be redirected to www.domainname.com/shop/
  • 1 Bu dökümanı faydalı bulan kullanıcılar:
Bu cevap yeterince yardımcı oldu mu?

İlgili diğer dökümanlar

PHP Error messages

If you are trying to debug a PHP application but do not see any error messages or just get a...

Do you offer Zend Optimizer / Zend Guard Web Hosting ?

Run Zend encoded php scripts and boost your website performance. Zend Optimizer support is...

What is phpMyAdmin?

A must-have tool for anyone who uses MySQL databases. This excellent web application...

What is PHP?

One of the world's most popular programming languages, included with every hosting account. PHP...

How do I update PHPList to use mysqli?

The distributed version of PHPlist uses a MySQL database and calls themysql functions, which are...

Powered by WHMCompleteSolution