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.

cleaning service near Bannockburn ..
In The News:

Learn how to act against cybercriminals in 2026 with essential security steps like two-factor authentication, software updates and credit freezing.
Choose between OpenAI releasing Sora text-to-video model, the AI race heating up, or Waymo driverless cars launching in cities across the country
Learn how to set up Google Maps and Apple Maps on your phone to automatically remember where you parked. Step-by-step instructions for enabling location services and parking detection.
Phishing scammers use rnicrosoft.com domain to impersonate Microsoft by replacing "m" with "rn" in typosquatting attacks that steal login credentials.
OpenAI announces new teen safety rules for ChatGPT users under 18, blocking romantic roleplay and requiring extra caution on body image topics.
A 2025 data breach at fintech company 700Credit exposes personal information of more than 5.8 million people through compromised third-party integration partner.
Retailers lose $76.5 billion annually to return fraud as nearly 10% of U.S. retail returns involve fraudulent activity, with $850 billion in returns expected in 2025.
ShinyHunters claims responsibility for stealing 94GB of Pornhub user data affecting over 200 million records and demands Bitcoin ransom.
ChatGPT 2025 now connects to Apple Music, Canva, Expedia, TripAdvisor and OpenTable through built-in apps that help users create playlists, design graphics and more.
Apple releases emergency patches for two zero-day vulnerabilities actively exploited in attacks. iPhone and iPad users urged to update immediately.
DoorDash launches Zesty, an AI-powered social app that recommends restaurants through conversational search, now testing in San Francisco and New York.
Cybersecurity firm Infoblox reveals that over 90 percent of parked domains now redirect visitors to scams and malware, making simple typos extremely dangerous.
The Fox News AI Newsletter covers the latest artificial intelligence technology advancements, including the challenges and opportunities AI presents now and for the future.
GPT-5.2 is now live for all ChatGPT users with improved coding, writing and image interpretation, with Kurt Knutsson offering his review.
New iPhone replacement scam uses pressure tactics and fake carrier calls to steal devices from buyers. Criminals claim shipping errors and demand urgent returns.
Amazon Ring's new facial recognition feature sparks privacy controversy as Electronic Frontier Foundation critics argue the AI upgrade expands surveillance risks.
New Android banking trojan Sturnus steals credentials, reads encrypted messages and controls devices.
Denmark's 3D-printed student village proves automation builds 36 apartments faster than traditional methods. Skovsporet project shows housing future.
Discover Android's new Sound Notifications feature that alerts you to smoke alarms, doorbells, and baby cries even when wearing headphones.
New SantaStealer malware reportedly threatens holiday shoppers with password theft. This Christmas-themed info-stealer targets browsers and crypto wallets.
The Christmas season brings a surge in Netflix phishing scams targeting shoppers with fake emails. Stacey P received convincing scam but verified account first.
San Francisco Giants invite Jamie Grohsong to throw ceremonial first pitch at Oracle Park after he learned to play baseball with a bionic hand following an injury.
FBI warns cybercriminals are stealing family photos from social media to create fake proof of life images in virtual kidnapping scams targeting victims.
Instagram's new 'Your Algorithm' tool lets you control your Reels feed in real time. The app now gives you power to customize what videos you see.
Major Marquis fintech breach exposes 400,000-plus Americans' data through unpatched SonicWall vulnerability, with Texas hardest hit at 354,000 affected.

4 Marketing Tips for Resourceful Webmasters!

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

Instant Relevant Web Site Content - No Its Not a Bot

In about the Time it takes to Watch a Reality... Read More

Achieving Differentiation With Your Website

Internet Marketing is not a miracle marketing strategy ? competition... Read More

Topics to Add When Creating an Alternate and Modern Medicine Web Directory

Alternate medicine finds its own place in the hearts and... Read More

If You Build It, They Will Come?

Building a new website can be a lengthy task. From... Read More

The 5 Biggest Mistakes Almost All Web Designers Make

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

Why a CSS Website Layout Will Make You Money

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

Creating a Sticky Web Site

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

Build It and They Will Come

Build it and they will come is not always true;... Read More

Your Website Should Be Selling

It may come as some surprise to a traditionally off-line... Read More

Tell me what your website does!

You know exactly what your organisation does and what your... Read More

Selecting a Web Content Management Product

So you want to take a look at a real... Read More

How to Draw Icons or Images on a Mapserver Generated Map

In this example I have used the map of the... Read More

Functions and Subroutines in ASP

Functions and Subroutines in ASP If you read... Read More

Building Websites with Directory Generator

Directory Generator, a product from Armand Morin and Marc Quarles,... 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

Frequent Business Question: How Do You Start a Web Business?

Today it seems everyone is jumping on the entrepreneur bandwagon,... Read More

Making The Business Case For Web Standards

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

The Road to Better Results

A lot has changed in the way sites are optimized... Read More

Top 10 Webmaster Challenges

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

Free Webmaster Tools - 7 Things Every Webmaster Needs in Their Toolbox

Webmaster tools are vital to becoming both efficient and effective... Read More

User Interface Design: Key to Achieve Best Web Development

From early days of www, the Internet sites that are... Read More

Website Value - Whats Your Business Website Worth?

If you were asked to put a value on your... Read More

How to Listen on the Web

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

Beyond Web Usability: Web Credibility

If you've been developing websites on Mars for the past... Read More

pet-friendly home cleaners Mundelein ..