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.

Northbrook Cadillac Deville rentals .. Lockport Chicago limo O’Hare
In The News:

Kurt "CyberGuy" Knutsson explains how you can creatively repurpose your old unused Android devices, which are full of potential and hidden value.
Mech the super-humanoid robot can lift up to 132 pounds and is designed to tackle stressful and repetitive tasks that often lead to workplace injuries.
Double-clicking is something we all do, often without giving it a second thought. But it could be giving hackers permission to do something dangerous.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Kurt the CyberGuy offers some of his easy expert tips to free up storage space on your Android if your device is running short on storage.
You can reset your internet router remotely if you're not home when your power goes out. Kurt "CyberGuy" Knutsson explains how this can be done.
The EO Canopy is a self-sustaining, solar-powered camping platform designed to provide all the comforts of home while completely off the grid.
Experts say hackers who used to focus on Windows operating systems are increasingly targeting Apple IDs as part of a new phishing campaign.
Unitree, a Chinese robotics company that developed a backflipping robot, has now introduced a humanoid robot capable of doing a side flip.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
According to the FBI, cybercriminals are sending extortion letters, threatening to release victims' sensitive information unless a ransom is paid.
FireSat is a satellite project designed to detect and track wildfires early, aiming to detect a fire that's the size of a classroom within 20 minutes.
Tech expert Kurt “CyberGuy" Knutsson reports that researchers have uncovered a Chrome vulnerability used in a cyber espionage campaign.
Preserving voicemails securely on Android: Tech expert Kurt “CyberGuy" Knutsson reveals easy methods to keep memories alive forever.
This phishing kit bypasses 2FA via session hijacking and real-time credential theft. Kurt “CyberGuy" Knutsson offers four ways to stay safe from Astaroth phishing attacks.
Tech expert Kurt “CyberGuy" Knutsson discusses Joby Aviation and Virgin Atlantic planning to launch 200-mph U.K. air taxis linking airports and cities.
Fake Apple virus warnings, security alerts and messages are tactics used to prompt you to call a number or click on a malicious link. The CyberGuy explains how to protect your devices.
The combination of artificial intelligence and neuroscience allows a paralyzed man to manipulate a robotic arm by using his brain to imagine movements.
With the help of artificial intelligence, sophisticated fraud techniques emerging today are virtually undetectable to the untrained eye.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents
If you need to free up space on your Mac, consider deleting duplicate photos in your image library. Apple makes it easy to do, and the CyberGuy explains the process.
Microsoft is discontinuing Skype in May after 22 years of service. Kurt the CyberGuy addresses other options for internet-based phone and video service.
Tron 1, a Chinese company's two-legged robot, is versatile and can walk, roll and pivot, even on rough terrain. Tron 1 stands 33 inches tall and weighs 44 pounds.
Hackers are tricking people into installing password-stealing malware by making them press keyboard shortcuts under the pretense of proving they're not bots.
Saving the voices of loved ones can be a comforting way to keep alive memories. Kurt "the CyberGuy" Knutsson explains how to preserve voicemail messages.

Wheres Your Focus, Money or Customer?

Is your website Really useful?I had a 'rep' in yesterday... Read More

But My Business Doesnt Need A Website!

Revenues are often lost because many business owners don't see... Read More

The 5 Biggest Mistakes Almost All Web Designers Make

Huge Mistake #1: Creating a Website with Flash -- Did... Read More

35% Revenue Increase? from Your Website!

2 Golden Rules for an Engaging Website35% of visitors fail... Read More

4 Marketing Tips for Resourceful Webmasters!

The internet is a sea of knowledge. Getting your information... Read More

Allocating Your Web Site?s Budget Properly

I had a client say something to me the other... Read More

Seven Daft Things Not To Do To Your Website

1. Splash pagesMost of the time splash pages are uncalled... Read More

Web Accessibility Myths

With more and more countries around the world passing laws... Read More

Creating a Sticky Web Site

When used to describe a web site, the term "sticky"... Read More

Improving Usability for Screen Reader Users

Simply ensuring your website is accessible to screen reader users... Read More

How To Evaluate Your Web Sites Performance

Setting up a website is the very first step of... Read More

Five Question-Five Minute Web Makeover Quiz

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

Top 10 Webmaster Challenges

Webmasters deal with a myriad of complex design challenges every... Read More

How To Get Profits From Your 404 Page Not Found File

"'Page Not Found' on this Server. Check the URL and... Read More

How to Get Your Website In Front of Thousands of Customers At No Cost To You!

Dan Kennedy once said that if you can't make money... Read More

Top 7 Reasons Why Your Business Needs a Website

A website provides invaluable advantages for businesses who have one.7... Read More

The Dos and Donts of Launching a Small Business Website

Launching a new small business website is often a long... Read More

Why Local Service Companies Should Have a Website

The Internet is being used by local service business to... Read More

Why Should Your Business Go O.N.L.I.N.E.

Optimize your time. How much time each day must you... Read More

Newsletter Management Using PHP w/o mySQL for Beginners

Let's begin by setting some limits. If you're like me,... Read More

Website Content & Usability

Writing for the web is totally different to writing for... Read More

Why You Need a Website

You hear a great deal about the Internet these days... Read More

How to Create Sizzling Sales online

"Don't Sell the Steak, Sell the Sizzle."Have you heard of... Read More

Email Addresses in Web Pages

You want to give your site's visitors a way to... Read More

How to Maximize the Value of Every Visitor to Your Website

While most marketers are beginning to understand the critical importance... Read More

Beason Mercedes Benz s500 rentals ..