Learn something new every day
More Info... by email
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.
One of our editors will review your suggestion and make changes if warranted. Note that depending on the number of suggestions we receive, this can take anywhere from a few hours to a few days. Thank you for helping to improve wiseGEEK!