We are independent & ad-supported. We may earn a commission for purchases made through our links.

Advertiser Disclosure

Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.

How We Make Money

We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently from our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.

What is PHP Redirect?

By R. Kayne
Updated May 17, 2024
Our promise to you
WiseGEEK is dedicated to creating trustworthy, high-quality content that always prioritizes transparency, integrity, and inclusivity above all else. Our ensure that our content creation and review process includes rigorous fact-checking, evidence-based, and continual updates to ensure accuracy and reliability.

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

Editorial Standards

At WiseGEEK, we are committed to creating content that you can trust. Our editorial process is designed to ensure that every piece of content we publish is accurate, reliable, and informative.

Our team of experienced writers and editors follows a strict set of guidelines to ensure the highest quality content. We conduct thorough research, fact-check all information, and rely on credible sources to back up our claims. Our content is reviewed by subject matter experts to ensure accuracy and clarity.

We believe in transparency and maintain editorial independence from our advertisers. Our team does not receive direct compensation from advertisers, allowing us to create unbiased content that prioritizes your interests.

A PHP redirect is a small bit of code embedded in a webpage that takes the surfer to a new webpage automatically. PHP once stood for Personal Home Page, though the term “PHP” is now used independent of that original meaning. The code was created in 1994 by Rasmus Lerdoff for his personal use, then released as PHP public code in 1995, with current implementations by The PHP Group. It is a standardized free scripting language.

A PHP redirect can be handy for webmasters that want visitors to bypass a defunct webpage and enter a new page at a different location or website address. Established search engine links along with links from other websites will continue to direct traffic to a defunct site long after a page has been taken down or the address has changed. Rather than lose that traffic, the webmaster can keep the old page posted to the Web server with just the PHP redirect code. This forwards visitors to the new page or site without making them click an additional link.

A PHP redirect can be employed a number of ways. While it is recommended all extraneous content or code on the page be removed, one can include a message to the surfer that the address of the page being sought has changed. The message also typically states that the surfer is being redirected, and suggests that bookmarks be updated to reflect the new address.

In the simplest form, PHP redirects the visitor seamlessly. Unless the surfer notices the uniform resource locator (URL) field in the Web browser, the new location will go unnoticed all together. This might not be the best choice if you want the new page bookmarked. A PHP redirect is not meant to be used indefinitely.

Unfortunately, redirects can also be used in phishing schemes or to siphon traffic from legitimate sites. In the latter case people are redirected from "decoy links" posing as legitimate sites. Traffic is redirected to offensive sites where mousetrapping is employed to get click revenue from surfers trying to click their way out. This misuse of redirects is called pagejacking.

Some browsers or their add-ons will protect surfers against being redirected. With this type of protection enabled the surfer might not be permitted to be redirected, or might be warned and asked to click a button to allow it.

Despite abuse by unscrupulous persons, PHP redirect code is handy to have on hand for nearly any webmaster. The code is freely available on many webpages, along with suggestions on how to implement it. If your Web host does not support PHP scripting, HTTP and JavaScript redirects are also widely published.

WiseGEEK is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.

Discussion Comments

WiseGEEK, in your inbox

Our latest articles, guides, and more, delivered daily.

WiseGEEK, in your inbox

Our latest articles, guides, and more, delivered daily.