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.

express cleaning service Arlington Heights ..
In The News:

The Fox News AI Newsletter gives readers the latest AI technology advancements, covering the challenges and opportunities AI presents.
ChatGPT data breach exposes personal info of users through partner Mixpanel. OpenAI confirms names, emails compromised in security incident.
Android rolls out Emergency Live Video for 911 calls, letting dispatchers see real-time scenes during emergencies. Great for holiday travel safety.
Malicious Chrome and Edge extensions collected browsing history, keystrokes and personal data from millions of users before Google and Microsoft removed them.
Google's new Call Reason feature lets Android users mark calls as urgent before dialing, displaying an urgent label to recipients using Phone by Google app.
Medical history made as surgeons successfully restore sight to legally blind patient using world's first 3D printed corneal implant grown from human cells.
Data brokers aggressively collect your holiday shopping data to fuel scams and targeted ads. Learn how to delete your digital profile before 2025 starts.
Scammers are sending fake MetaMask wallet verification emails using official branding to steal crypto information through phishing links and fraudulent domains.
Learn what background permissions, push notifications, security updates, auto-join networks and app refresh mean to better manage your phone's privacy settings.
Criminals test stolen data by applying for deposit accounts in victims' names to prepare bigger attacks. Learn why banks won't share fraud details.
New study of 10,500+ kids reveals early smartphone ownership linked to depression, obesity, and poor sleep by age 12. Earlier phones mean higher risks.
A phone phishing attack compromised Harvard's alumni and donor database, marking the second security incident at the university in recent months.
AutoFlight's zero-carbon floating vertiport uses solar power to charge eVTOL aircraft while supporting emergency response, tourism, and marine energy maintenance.
A new phone return scam targets recent buyers with fake carrier calls. Learn how criminals steal devices and steps to protect yourself from this fraud.
New Anthropic research reveals how AI reward hacking leads to dangerous behaviors, including models giving harmful advice like drinking bleach to users seeking help.
The Fox News AI Newsletter gives readers the latest AI technology advancements, covering the challenges and opportunities AI presents.
Holiday email scams, including non-delivery fraud and gift card schemes, spike in November and December, costing victims hundreds of millions, the FBI says.
Holiday visits offer the perfect opportunity to help older parents with technology updates, scam protection and basic troubleshooting skills for safer digital experiences.
Swiss scientists create grain-sized robot that surgeons control with magnets to deliver medicine precisely through blood vessels in medical breakthrough.
Researchers exploited WhatsApp's API vulnerability to scrape 3.5 billion phone numbers. Learn how this massive data breach happened and protect yourself.
Travel companies share passenger data with third parties during holidays, but travelers can protect themselves by removing data from broker sites and using aliases.
Xpeng's humanoid robot moves so realistically that crowds believed it was fake, marking a major advancement in robotics technology ahead of 2026 commercial launch.
Researchers discover phishing scam using invisible characters to evade email security, with protection tips including password managers and two-factor authentication.
iPhone and Android users can reduce battery drain and data usage by restricting Background App Refresh to Wi-Fi connections instead of mobile networks.
Scammers nearly stole an Apple account by exploiting the support system with authentic-looking tickets and phone calls, users can protect themselves with safety steps.

A Network Of Web Sites Is Not Enough!

The big thing these days is your ability to capture... Read More

The Secret Benefit Of Accessibility: Part 1 - Increased Usability

Web accessibility has so many benefits that I really do... Read More

7 Reasons Why Your Small Business Needs A Web Site

Many small businesses have the misconception that their business can... Read More

Internet Marketing Website Promotion -The 7 Biggest Mistakes I See People Make With Websites!

1. Many people are not getting good or complete advice.... Read More

The Problem with Paypal On Your Web Page

When I set up my website I felt paypal was... Read More

Launch Your Own Website Today - Its Easier Than You Think!

Thousands of people are now making a living online and... Read More

The Cost Of A Web Site

Just starting out, you can start with a simple informational... Read More

Eight Deadly Web Site Mistakes and How to Avoid Them

Creating and maintaining an effective presence on the Web has... Read More

If You Build It, They Will Come?

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

Are Web Graphics Stealing Your Money?

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

Is Your Website Innovative? Increase Your Business Over Night!

While studying online for IT investment opportunities, I found that... Read More

The Power Of CPanel

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

Dreamweaver 8 Preview

August 8 2005, Macromedia announced a release of Studio 8.... Read More

The 5 Biggest Mistakes Almost All Web Designers Make

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

Non-Profits: Successful Online Strategies

More and more non-profit organizations are developing websites to help... Read More

How One Word Or Even One Letter Can Boost Conversion Rates By Over 400%!

Recently I was reviewing the keyword specific conversion rate data... Read More

Creating Compelling Content , Write It and They Will Come

In a previous ezinearticles.com article,"I Need real visitors, Not Search... Read More

Why Local Service Companies Should Have a Website

The Internet is being used by local service business to... Read More

Your Content for Nothing and Your Clicks for Free

The first thing my business consultant (read brother-in-law) asked me,... Read More

Nonsense! Why Do I Need a Website?

"I don't sell anything online, I don't advertise online, in... Read More

Conceptualize, Build and Publish a Web site

Conceptualize, Build and Publish a Web site - What's required... Read More

How To Convert More Sales On Your Website

One of the biggest mistakes that most online retailers make... Read More

Credibility - 10 Ways to Build it on Your Website

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

Ebooks for Webmasters

Internet has opened a whole new world for web developers... Read More

The Disability Discrimination Act (DDA) & Web Accessibility

There's been widespread speculation about the new legislation being introduced... Read More

tidy up service Arlington Heights ..