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:
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
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,
The above HTTP based redirect needs to be in the region of the HTML code.
* JavaScript Redirects
setTimeout("location.href='[some-url]'", [time]);
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 or 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
Sanjib Ahmad, Freelance Writer and Product Consultant for 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.
home cleaning services Deerfield ..In this example I have used the map of the... Read More
There are several reverse bid freelance sites out there. Beyond... Read More
Just like all things in life, the ways to run... Read More
If you are developing your website on a host that... Read More
Thinking about starting up a business? The web is the... Read More
What is SQL? SQL stands for Structured Query Language and... Read More
You've decided to create a website to market your products... Read More
Building a new website can be a lengthy task. From... Read More
The art of turning website visitors into paying customers depends... Read More
--------------------------------Why Should You Create a website?--------------------------------A. What do you want... Read More
When you consider the billions of individuals and companies on... Read More
Like wine cars get more attractive to collectors as years... Read More
Why do some sites succeed while the vast majority of... Read More
Does My Web Site Require A Web Database?If your web... Read More
Webmaster tools are vital to becoming both efficient and effective... Read More
1. As the first step, "Hire a web designer."First create... Read More
From early days of www, the Internet sites that are... Read More
A simple website stats counter is not enough if you... Read More
Anyone who knows anything about web accessibility knows that images... Read More
You know exactly what your organisation does and what your... Read More
When you publish a content site there are times when... Read More
Webmasters deal with a myriad of complex design challenges every... Read More
If you're looking for better web site ROI, chances are,... Read More
Losing website sales and traffic is sometimes simply a case... Read More
1) Data CaptureOne easy way to collect e-mail addresses and... Read More
recurring housekeeping Highland Park ..With search engines putting a damper on direct reciprocal links,... Read More
1. Splash pagesMost of the time splash pages are uncalled... Read More
A PHP Redirect automatically transfers a web user from one... Read More
Building a website and getting it online is easy. Driving... Read More
The needs of screen magnifier users are overlooked when implementing... Read More
Revenues are often lost because many business owners don't see... Read More
There was a time not long ago when setting up... Read More
The growth in Internet usage around the world is astounding... Read More
To the starting internet entrepreneur, there is nothing more discouraging... Read More
That's right. According to a recent study by Nielsen/NetRatings, Amazon.com... Read More
When used to describe a web site, the term "sticky"... Read More
If you were asked to put a value on your... Read More
Go to any internet marketing forum you want these days... Read More
Right after the thought, "I need a website," people usually... Read More
No matter the size of your business, having a web... Read More
In the region where my company is located, South Bend,... Read More
What happened on your website yesterday? What about last week... Read More
One of the things that many people overlook when building... Read More
Setting up a website is the very first step of... Read More
QUESTION: Should I build and maintain my business Web... Read More
Many of site owners still don't realize all advantages of... Read More
The Disability Discrimination Act states that service providers must not... Read More
1. SiteSpinner V2 - On Sale www.deprice.com/sitespinner.htmSiteSpinner is a user-friendly... Read More
See how you can create graphic effects on text with... Read More
Do you make your website just to entertain yourself or... Read More
Web Development |