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.

whole house cleaning Deerfield ..
In The News:

Essential phone settings to enable before losing your device, including Find My network, location services and security features for iPhone and Android.
The Fox News AI Newsletter gives readers the latest AI technology advancements, covering the challenges and opportunities AI presents.
Cybersecurity research shows weak passwords remain a major threat, with simple patterns and number sequences putting millions of accounts at risk.
New Android malware BankBot YNRK silences phones, steals banking data and drains crypto wallets automatically. Learn how this advanced threat works.
FDA approves first human trial for Paradromics' brain-computer interface that could restore speech for paralyzed patients through neural technology.
New phishing platform QRR targets Microsoft 365 users across 1,000 domains in 90 countries. Learn how to spot fake login pages and protect your accounts.
OpenTable now uses AI to track your dining habits and share insights with restaurants. Learn what data they collect and how to protect your privacy.
Google's discontinued Nest thermostats still secretly upload home data to company servers despite losing smart features, raising serious privacy concerns.
New Android malware NGate steals NFC payment codes in real-time, allowing criminals to withdraw cash from ATMs without your card. Learn protection tips.
DoorDash confirms data breach exposing customer names, emails, addresses after social engineering attack. Learn how to protect yourself from scams.
Concerned about Google's AI scanning your Gmail? Learn how to disable Gemini features that access your emails, Drive files and Chat messages for privacy.
Google warns Android users about dangerous fake VPN apps hiding malware that steals passwords, banking details and personal data from phones and tablets.
Apple's digital passport feature lets iPhone users breeze through TSA checkpoints this holiday season using Digital ID technology at 250+ airports.
A new phishing scam targets family photos with fake "Cloud Storage Full" alerts. Criminals steal credit card information through fake sites. Learn protection tips.
South Korean scientists create ultra-thin fabric muscles that turn clothes into robotic assistants, lifting 33 pounds while weighing under half an ounce.
Archer Aviation has acquired Hawthorne Airport for $126M to launch an LA air taxi network ahead of the 2028 Olympics, featuring AI-powered eVTOL operations and next-gen aviation tech.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Fake AI apps disguised as "ChatGPT" and "DALLĀ·E" are flooding app stores with dangerous malware that steals data and monitors users without detection.
Fake buyers demand specific vehicle reports from unknown sites to steal credit card information from car sellers, but warning signs can help identify these scams before paying.
Android users can now manage apps across multiple devices more easily with Google Play Store's updated remote uninstall button in the latest update.
NASA's Perseverance rover discovers shiny metallic rock on Mars that could be a meteorite from an ancient asteroid, containing high levels of iron and nickel.
Holiday scams spike during Black Friday and Cyber Monday as criminals exploit your leaked personal data. Learn how to protect yourself from fake stores and phishing.
Commerce Department proposes TP-Link router ban over Chinese security risks. Learn how this potential prohibition could affect your home network and devices.
Hyundai AutoEver America suffered a data breach affecting 2,000 current and former employees, exposing names, Social Security numbers and driver's license information.
Washington court rules automated license plate reader images are public records, even when stored by vendors like Flock Safety, setting precedent for transparency.

Direct Sales and Your Corporate Website - A Creative Marketing Plan that Works!

Creatively marketing your corporate site takes time in the set... Read More

Why A Simple Counter is Never Enough for Your Website

A simple website stats counter is not enough if you... Read More

The Power Of CPanel

cPanel is a control panel for your website and allows... Read More

Making The Business Case For Web Standards

Through the explosive growth of the Web, companies have realized... Read More

Adding Word Rich Content to Your Website

You have permission to publish this article electronically, in print,... Read More

Making Your Websites More Compelling

The Internet is a remarkable publishing medium. With just a... Read More

Is Your Website Innovative? Increase Your Business Over Night!

While studying online for IT investment opportunities, I found that... Read More

Why You Need a Website

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

How to Listen on the Web

When building a relationship, listening is more important than talking.A... Read More

How to Get a Knock Out Website!

The first step in setting up an online business...Starting an... Read More

Planning A Usable Website: A Three-step Guide

A website is like an information flow, with you as... Read More

Web Site Optimization: How To Speed Up Your Web Site By Minimizing Your GIF and PNG Image Bit-Depth

Are bloated images slowing down your web site and causing... Read More

The Number One Reason Most Websites Fail

Failure, just like success, is measured differently by each and... Read More

Are You Losing Sales Because of These 4 Simple Website Mistakes?

Losing website sales and traffic is sometimes simply a case... Read More

12 Tips To Great Websites

Why do some sites succeed while the vast majority of... Read More

How Disabled Users Access The Internet

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

My Yahoo Search - Beyond Bookmarks

Yahoo has long offered email, an online calendar, notes, bookmarks,... Read More

Why Do I Need A Web Site?

Even though the Internet has been around for a long... Read More

Earning From Your Website

Before you start building your site, ask yourself "WHY?". Why... Read More

You Cant Just Build A Website And Hope It Works!

Like any area of business your website needs some effort... Read More

Revealing the Firefox Secret Used by Top Web Developers and Power-Browsers

Profiles are one of the best kept secrets around regarding... Read More

The Power Is In The Pipes: How To Get Maximum Leverage From Your Website

What is the most important part of your online business?Many... Read More

Benefits Of An Accessible Website: Part 2 - The Business Case

The DDA (Disability Discrimination Act) states that service providers must... Read More

You Don?t Have to be Amazon.com to Achieve 12% Conversion Rates!

That's right. According to a recent study by Nielsen/NetRatings, Amazon.com... Read More

Top 7 Tips for Building an Antique Car Website

Like wine cars get more attractive to collectors as years... Read More

home cleaning services Des Plaines ..