< Vancouver Website Design - Vancouver Web Design - Vancouver Website Hosting - D-Mack Media

Vancouver Website Design | Vancouver Web Design | Vancouver Web Hosting | Vancouver Website Hosting | Vancouver Email Newsletters | Vancouver Business Websites

D-Mack Media Hosting

Email Newsletter Services :  Website Portfolio :  Internet Dictionary :  Links-1 :  Links-2 :  D-Mack News :  Testimonials :  Awards

 

PHP Redirects and how to use them

Page 1 Page 2

Usually a PHP redirect is much more reliable than other form of redirects like HTTP redirect or JavaScript based redirects.

A PHP Redirect automatically transfers a web user from one URL to another. For example, typing foo.com in the browser automatically transfers the user to another URL bar.com.

The PHP Redirect command:

<?php
header("location: [some-url]");
?>

Replace [some-url] with the URL where you want the redirection to take place.

For example,

header("location: ./version2/index.html");
=>redirect to "index.html" page in subfolder called "version2"

header("location: http://www.yahoo.com");
=>redirect to a website called yahoo.com

If PHP is not available, it's also possible to use other redirects:

* HTTP Redirects

<meta http-equiv="Refresh" content="[time]; URL=[some-url]">

Replace [time] with seconds. This will pause the browser for the specified number of seconds. Replace [some-url] with the target URL you want to redirect. For example,

<meta http-equiv="Refresh" content="5; URL=http://www.yahoo.com">

The above HTTP based redirect needs to be in the <header></header> region of the HTML code.

* JavaScript Redirects

<script language=javascript>
setTimeout("location.href='[some-url]'", [time]);
</script>

 

Page 1 Page 2
 

    Back to Main Articles List    
 

 

 

 

Don't hesitate to give us a call and ask some questions if you don't find your answers here!

vancouver website design Vancouver Websites

Vancouver website hosting Vancouver Web Design

Internet marketing Vancouver Web Hosting

vancouver website design

 

...or disappear

D-Mack Media Vancouver Website Hosting

multimedia services Vancouver Email Newsletters

Vancouver BC Complete Website Design

Home About Us Services Portfolio Links Contact Us

Site Map

Copyright © D-Mack MediaAll rights reserved.  :  Vancouver Website Design  :  Privacy and Copyright Policy

Page Loading Time:

D-Mack Media provides friendly and personalized multimedia services for business in Vancouver, British Columbia, Canada - Site is purpose to inform and educate businesses and individuals of available services for Vancouver website design, website hosting and domain name registration as well as customized presentations, digital photography, electronic press kits, email newsletters and Canadian business communication expertise - complete website design, domain name, hosting, digital photography, custom presentations vancouver website design, vancouver web design, website design, web design, business websites, online web presence, email newsletters, newsletter campaigns - vancouver website design, vancouver web design, vancouver website hosting, website design, website hosting, web design, web hosting, domain registration, domain name, vancouver, surrey, british columbia, bc, canada, lower mainland, greater vancouver, consultant, consultants, business, marketing, photography, proposals, photo restoration, photo manipulation, digital video production, multimedia cds, cd roms, dvd roms, ecommerce, flash, newsletters, graphic design, small business, business cards, e commerce business, internet hosting, web development, custom graphics, website templates