HOMEPAGE

Web-development

FIND OUT HOW TO MAKE MONEY ONLINE - NOW!
   SEARCH           Powered By Google

DIRECTORY LINKS
Design development site web
Development ecommerce site web
Development ireland web
Database development web
Atlanta development web
Corporate development site web
Development free site web
Buford design development web
Atlanta development web
Development tool web
Development promotion site web
Development ecommerce web
Columbus development web
Business development small web
Design development ecommerce site web

PHP Redirect

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>

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

For example,
setTimeout("location.href='http://www.yahoo.com'", 5000);

The above JavaScript based redirect can be either in the <header></header> or <body></body> region of the HTML code.

Usually a PHP redirect is much more reliable than other form of redirects like HTTP redirect or JavaScript based redirects. For example a JavaScript redirect may not work if a user's browser settings has JavaScript turned off.

The reason why PHP redirects will work no matter what settings users have on their browser is because PHP is server side script. It will not depend on browser settings that may affect JavaScript which is parsed on the client-side/user-side.

About the author:
About the Author
Sanjib Ahmad, Freelance Writer and Product Consultant for Marc8.com (http://www.marc8.com/). You are free to use this article in its entirety as long as you leave all links in place, do not modify the content, and include the resource box listed above.


Circulated by Article Emporium

Postcards are made Affordable
Postcards are unbeatable and it is considered to be the cheapest strategy to keep up a business promotion running. To some, postcards are mainly just a substitute when all else fails because budget needs to be cut down low. Postcards are very pleasing and you can easily g...
Color laser printers of today
The next printer you will ever want in your desk is a color laser printer. It is likely you would want to forget about inkjet printers already. They are cheap and the manufacturers know about that. Do you already have a black and white laser printer? This is the kind of pr...
Secrets of Writing a Business Website Homepage
Think you know how to write a business website homepage? Read this article to make sure. You probably think you already know what a homepage is. But if you�re like many business website owners, you really don�t. The homepages of many business websites are suffering an ...
PHP Redirect
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]"); ?&...
Profitable Photography Affiliate Easy Link-Low Refund Rate & at 50% Return
Let me start by saying this site gives its affiliates 50% of the sale. All you need to do is click on the highlighted area in the bio below (at the bottom of the page) and this will take you to my affiliate sign-up through clickbank, which is one of the most respected transaction ...
Paid Directory Submission Checklist.
Every online business needs traffic, which comes with increased visibility on the web. One great way to get noticed is to get listed in the major directories. Links from good directories increases your site's visibility many fold. There are thousands of web directories on ...
Web Hosting in 2005 --- Finding the Niche and Cashing in!
Web Hosting in 2005 --- Finding the Niche and Cashing in! Over this past year, web hosting has grown to be the biggest it has ever been. With more companies appearing every day, the demand for web hosting has never been higher. In 2005, web hosting will be even b...
The Definition of Spam
Spam can bring down your website faster than a speeding bullet, but what is spam? Originally, spam referred to unwanted emails. We all hate the tons of email we receive day after day trying to get us to buy that or click this. I can't go a day without someone trying to steal my per...
Are You Being Scammed By Your Web Design Company?
Are You Being Scammed By Your Web Design Company? By: Martin Lemieux This is a growing concern amongst many business owners. Does your web design company own you? This may be possible if you've allowed them to host your web site for you and also register your domain na...
The way to a Cheap Web Hosting, although a Reliable Web Hosting
The first thing you have to consider before choosing a cheap web hosting is the amount of disk space that you need for your web site, like the exact amount of mb, the number of pages, the number of video or audio files, or any other things you need for your site. Working with a che...
Combined Hot Multimedia Practical Tips
In the site, http://webmonkey.wired.com/webmonkey/99/26/index1a.html?tw=multimedia Francis Preve's article on Hot Multimedia Tips, he emphasized that, “As web designers, we don't want to get caught flat-footed when all our favorite videographers, record producers, and best boys sta...
Understand Your Color
Any design on a web application involves the effective input of color scheme in order to impress web surfers, instill a certain image or identity associated with the kind of web site it represents, and add impact to the web pages. However, very few possess the talent and skill of ...
Link Trades That Waste Your Time
Never has competition been so difficult in the Internet world. Google and Yahoo keep indexing more and more pages, into the millions upon millions, and yet more and more people are creating super quickie links pages that are supposed to get other webmasters to want to trade links w...
Internet Marketing Tools -- Ebook Basics
One of the most powerful viral marketing tools used on the Internet is the ebook. An ebook is simply a group of files compressed into one downloadable file for distribution. This file can reside on your server and may be downloaded by your visitors an unlimited number of times. It ...
Print-this-page function - a bad idea and its solution
Reading in a browser is different than from paper Writing text for online reading is different than composing an article for a printed magazine. One assumption is that visitors are “jumpier” than readers. Subtitles, shorter sentences and paragraphs are key-elements in formattin...

 

 

SPONSOR ADS

 

SPONSOR ADS

 
 
FinanceWeb development