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.

spotless home service Lake Forest ..
In The News:

A Columbia University breach exposed names, Social Security numbers and academic records of nearly 869,000 people, with notifications beginning in August.
Rental car drivers use AI-powered apps like Proofr to protect themselves from unfair damage fees as major companies deploy automated inspection tools.
Fox News' AI newsletter brings you the latest on technology advancements around artificial intelligence.
OnTrac data breach between April 13-15, 2025, exposed personal information of over 40,000 people including Social Security numbers and medical records.
A woman named Wika announces her engagement to an AI chatbot sparking worldwide debate about virtual relationships and technology.
The notorious people search site National Public Data relaunches despite a previous breach affecting 3 billion individuals, raising fresh privacy concerns.
Revolutionary TRAUMAGEL gel controls life-threatening bleeding from gunshot wounds and traumatic injuries, helping first responders prevent prehospital deaths.
Protect your home network by enabling proper encryption, creating strong passwords, checking connected devices and using VPN and antivirus software.
The Navy's solar-powered Skydweller drone flew nonstop for 73 hours in Mississippi, proving renewable energy can power long-endurance military missions.
Moving and downsizing expose seniors to identity theft and scams as data brokers collect real estate records and personal information to sell to criminals.
ShengShu's Vidar technology revolutionizes humanoid robot training by using AI-generated synthetic video, reducing required training data from hours to just 20 minutes.
Apple's older Mac computers face security risks without regular updates, but 10 essential tips including FileVault encryption and strong passwords can keep aging Macs protected.
Self-driving trucks from PlusAI could reshape freight transportation by 2027, addressing driver shortages and reducing logistics costs for businesses.
Solar farms are turning to sheep instead of mowers to cut grass under solar panels, lowering costs, reducing emissions and creating new income for farmers.
Fraudsters posing as local officials are making fake calls about missed jury duty, demanding payments in a rising scheme that exploits fear of arrest.
Honeywell Aerospace engineers developed a "surface alert system" that gives pilots two aural warnings when they are 15 and 30 seconds away from a collision on the runway.
Anonymous researcher has scraped public Spotify accounts of politicians and celebrities, highlighting major privacy risks in default platform settings.
AI chatbot toys marketed as screen-free playmates could undermine children's empathy and critical thinking skills, according to pediatric specialists.
TransUnion confirms a major data breach affecting 4.4 million U.S. consumers after hackers exploited third-party Salesforce apps to steal personal info.
Scammers use fake DocuSign emails claiming Apple Pay charges to steal personal information using fraudulent phone numbers and fake receipts.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Farmers Insurance confirms data breach affecting over 1.1 million customers nationwide, exposing customer info including addresses.
The iconic Mary Kay pink Cadillac goes electric with the Cadillac Optiq, available only to the company's top 1% of sales force performers.
Cybercriminals abuse trusted Intel driver to gain kernel access and shut down Windows Defender, enabling undetected malware deployment since July 2025.
Using email aliases for online shopping and subscriptions can protect your privacy by preventing companies from linking your activity across websites.

How to Promote Your Law Firm Website On the Internet for Maximum Profit

Making maximum profit from your law firm website is important,... Read More

Should You Design Your Own Website?

If you're anything like most small business owners, you probably... Read More

The Most Important Aspect of Writing Web Copy

There is an ongoing debate about web copy. Some say... Read More

How Disabled Users Access The Internet

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

Instant Relevant Web Site Content - No Its Not a Bot

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

Credibility - 10 Ways to Build it on Your Website

If you have your own business website and you are... Read More

Functions and Subroutines in ASP

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

Web Development Processes and Technical Environments

The process of Web application development is critical to the... Read More

Writing Effective ALT Text For Images

Anyone who knows anything about web accessibility knows that images... 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

2 Key Ways to Make Your Site a Success

If one more business owner tells me their website sucks... Read More

Beyond Web Usability: Web Credibility

If you've been developing websites on Mars for the past... 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

The Top Ten Benefits of Having a Web Site

Do you need a web site? Are you considering getting... Read More

Ever Wondered What Challenges Other People With Their Web Site?

Have you ever wondered what challenges are faced by other... Read More

Is Your Website Doomed for Failure Before Youve Built It?

One of the things that many people overlook when building... Read More

Web Content: How Much Should I Pay?

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

Lead Generation How to -- 10 Tips On Generating More Internet Sales Leads

Many millions of dollars are being wasted on promoting and... 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

Selling Your Site: Outsource or Homemade?

To the starting internet entrepreneur, there is nothing more discouraging... Read More

50 Ways To Use Your Website

A website is the most versatile and cost-effective marketing tool... Read More

Introductory PHP For Non-Programmers

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

Make Your Own Brand!

There are millions and millions of websites on the Internet.... Read More

Give Your Business a Cash Infusion

Whether you have your own business already, or are looking... Read More

Profitable Websites for Exclusive Industries

In the region where my company is located, South Bend,... Read More

weekly home cleaning Mundelein ..