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:

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.

executive chauffeured services Bradford .. Madison to Airport car
In The News:

Getting virus alerts on your iPhone? Tech expert Kurt “CyberGuy" Knutsson helps you learn how to handle fake scam alerts and boost security.
Tech expert Kurt “CyberGuy" Knutsson says opening emails is safe, but risks arise from interacting with links, attachments or HTML content.
Tech expert Kurt “CyberGuy" Knutsson reveals four signs of compromised Social Security numbers and offers five steps to protect yourself.
Tech expert Kurt “CyberGuy" Knutsson discusses how MAB Robotics' Honey Badger 4.0, a versatile robot, now walks underwater with amphibious skills.
An updated Android trojan called FakeCall hijacks bank calls. Tech expert Kurt “CyberGuy" Knutsson says Android phone manufacturers and Google need to step up their game on security.
The Massimo Modular E9 is a sleek, smart and comfy tiny home in 409 square feet. Tech expert Kurt “CyberGuy" Knutsson takes a closer look at what the future of housing might look like.
Every stock trader should consider a virtual private network to safeguard their trading, according to tech guru Kurt "CyberGuy" Knutsson.
Apple recently announced its new lineup of Macs and rolled out Apple Intelligence, its latest artificial intelligence-powered feature for its products.
A Swiss-engineered robot can climb ladders, showing why it's at the cutting edge of autonomous robotic solutions for harsh industrial settings.
Kurt "CyberGuy" Knutsson presents the cities targeted most by robocalls, why this is happening and what you can do about it to protect your privacy.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents
Kurt "CyberGuy" Knutsson shares tips and suggestions for how to get the best use out of the updated Calendar app available with the latest iOS update.
Your Social Security number, your unique identifier used for many purposes, has likely been leaked on the Dark Web; here are some steps you can take to protect yourself.
Researchers have developed a new technology that creates strong, sticky fibers capable of lifting objects and capturing things from a distance.
Smart rings track the same things that smartwatches do, including steps, sleep and a general overview of your overall health, and they tend have more battery life than smartwatches.
Researchers have developed a robotic finger that can perform routine medical exams like those conducted by doctors, helping to address the growing shortage of trained professionals.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Insurance administrative services company Landmark Admin reported that a data breach from a May cyberattack affected over 800,000 people.
Sotheby's will auction the first artwork created by Ai-Da, the world's first robot artist created in 2019 by British gallerist Aidan Meller.
More than 250 million users of the Verizon Messages app will have to switch to another app. Verizon is shutting down Messages in the next month.
Tech expert Kurt “CyberGuy" Knutsson provides a list of 10 celebrities who are the most targeted by deepfake scams, including Tom Hanks.
Tech expert Kurt “CyberGuy" Knutsson discusses how Vast's Haven-1, launching in 2025, transforms space living with human-centric design.
UnitedHealth confirms over 100 million Change Healthcare users had their data stolen. Kurt “CyberGuy" Knutsson reveals what happened and what caused the breach.
Tech expert Kurt “CyberGuy" Knutsson explains how iOS 18 brings new text formatting and animated effects to the Messages app.
Whether you're a social media veteran or novice, Facebook friend request scams are common. Kurt the CyberGuy provides tips to keep your account safe.

Thinking Of Taking Money Online? Whats Best For Merchants? PayPal, WorldPay or Something Else?

It's now easier than ever to take payments on the... Read More

Where?s Your Web Site?

This simple question can take on several different forms, but... Read More

Getting a Web Site Can Be Fast, Easy, and Inexpensive When You Know Your Options

So what do you do if need to get a... Read More

Why a CSS Website Layout Will Make You Money

Although CSS layouts have been around for years, they haven't... Read More

Beware the Software Siren

I've heard several prominent web marketers mention in their classes... Read More

Is Your Web Site Talking to Your Customer?

A while ago one of my clients approached me and... Read More

Dreamweaver 8 Preview

August 8 2005, Macromedia announced a release of Studio 8.... Read More

Five Question-Five Minute Web Makeover Quiz

If you haven't made the sales and built your clients... Read More

Why to Have a Website for Your Company

After having decided to start a business, the next thing... Read More

Unlocking the Power of Your Website!

Why do some web sites reap huge benefits while others... Read More

7 Killer Ways To Increase Your Online Sales

Every online entrepreneur I talk to is asking the same... Read More

5 Sure Fire Ways To Send Visitors Away For Good

So your traffic is going through the roof yeah? It's... Read More

Using Psychology Easily on Your Website to Make More Sales!

Psychology is a long word which everyone thinks, "no, that's... Read More

7 Golden Rules For Building Mini Sites

First, an eye opener. Making your fortune through affiliate programs... Read More

What Works and What not Works for Your Internet Business

"Build it and they will come."--Filed of Dreams (1989) If... Read More

Maintaining Your Business Website

QUESTION: Should I build and maintain my business Web... Read More

7 Profit Producing Reasons Why Every Successful Service Professional Needs A Web Presence

Your business website is a critical aspect of being able... Read More

Get to Know People through Websites

Web sites are not just places to sell things; they... Read More

How Improving Your Sites Usability Can Increase Your Buyers by 40% and Boost Each Order By 10%!

With all of the factors involved in designing and building... Read More

Developing State-enabled Applications With PHP

Installment 1Developing State-enabled Applications With PHPWhen a user is browsing... Read More

Ten Ways NOT to Set Up a Website-based Service Business

1. As the first step, "Hire a web designer."First create... Read More

Building a Web Site Requires the Right Software to Eliminate Headaches and Keep Money in Your Pocket

When most people build a web site, they think one... Read More

Make Your Web Site User-Friendly!

Making a web site is easy. Making a good web... Read More

Introductory PHP For Non-Programmers

When you started reading this sentence you assumed lo acabar?a... Read More

How Disabled Users Access The Internet

In 1995 a new era of accessibility for disabled people... Read More

O'Hare Chicago prom limo ..