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.

maid service near Lake Forest ..
In The News:

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.
Fake airline texts claiming flight cancellations are targeting travelers with convincing scams. Learn how cybercriminals steal personal data and credit card info.
Discover how iOS 26's new Adaptive Power feature automatically extends iPhone battery life by learning your usage patterns and adjusting performance intelligently.
New TikTok malware campaign tricks users into running PowerShell commands that download Aura Stealer, which steals credentials and authentication tokens.
Gaia Family offers fixed upfront pricing for IVF cycles with unlimited embryo transfers and financial protection, partnering with over 100 U.S. fertility clinics.
The Jetsons Act aims to position Pennsylvania as a leader in advanced air mobility by establishing regulations for hybrid ground-air vehicles.

Wheres Your Focus, Money or Customer?

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

The Power Of CPanel

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

Website Sales: 10 Reasons Why People Dont Buy From You

You've put up a website to promote a product or... Read More

MySQL Database Handling in PHP

Most interactive websites nowadays require data to be presented dynamically... Read More

Free Isnt Always Good - 5 Reasons Why You Need Your Own Website

Often time I've browsed sites and seen the same thing... Read More

Business Website Building Do?s and Don?ts

First, using a lot of web graphics, flash, banners and... Read More

Maximizing ROI via Web Site Traffic Analysis

We are clearly well past the innocent "golden age" of... Read More

10 Simple Steps: Its Magic If You can E-Mail You can Update Your Web Page Dynamically

Dynamically Update Your Web Pages Via E-MailIf you can Send... 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

If You Build It, They Will Come?

Building a new website can be a lengthy task. From... 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

Making the Most of Your Website: Start with the Basics

One of my most salient memories from when I sold... Read More

Websites for Writers ? Why You Need One and How to Get Started Today

It may seem like the publishing industry's equivalent of Beanie... Read More

How to Increase Sales with Automation Improvements

How popular is online shopping? And is there room for... Read More

The Two Most Common Mistakes That Scare Away Web Visitors

Can you imagine the hypocrisy of spending thousands of dollars,... Read More

FREE Amber Alert Tickers for Your Website

Project Safekids provides webmasters a valuable tool which could save... Read More

Make Your Web Site User-Friendly!

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

4 Rock Solid Reasons For Building Your Own Website

What is the point of having a website, you may... Read More

Creating a Sticky Web Site

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

Web Content: How Much Should I Pay?

When web content gets discussed on webmaster bulletin boards, the... Read More

Are Web Graphics Stealing Your Money?

They might not be wearing a mask and carrying a... Read More

Increase Hits to Help Increase Your Business

In this day and age most businesses consider having their... 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

5 Essential Traits Of A Home Business Website

So you've decided to start an online work at home... Read More

Website Globalization

Globalize Your WebsiteThe Internet has unlocked a wide array of... Read More

top rated cleaning service Des Plaines ..