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.

professional maid services Deerfield ..
In The News:

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.
FoloToy restored sales of its AI teddy bear Kumma after a weeklong suspension following safety group findings of risky and inappropriate responses to children.
Threat intelligence firm Synthient uncovers one of the largest password exposures ever, prompting immediate security recommendations.
Viral video shared by Elon Musk shows Tesla's Optimus humanoid robots performing tasks from cooking to construction, garnering over 58.5 million views on social media.
Chinese hackers used Anthropic's Claude AI to launch autonomous cyberattacks on 30 organizations worldwide, marking a major shift in cybersecurity threats.
Apple's new Sleep Score feature gives you a rating for your nightly rest quality. Learn how to set it up on your Apple Watch and iPhone today.
Essential phone settings to enable before losing your device, including Find My network, location services and security features for iPhone and Android.
The Fox News AI Newsletter gives readers the latest AI technology advancements, covering the challenges and opportunities AI presents.
Cybersecurity research shows weak passwords remain a major threat, with simple patterns and number sequences putting millions of accounts at risk.
New Android malware BankBot YNRK silences phones, steals banking data and drains crypto wallets automatically. Learn how this advanced threat works.
FDA approves first human trial for Paradromics' brain-computer interface that could restore speech for paralyzed patients through neural technology.
New phishing platform QRR targets Microsoft 365 users across 1,000 domains in 90 countries. Learn how to spot fake login pages and protect your accounts.
OpenTable now uses AI to track your dining habits and share insights with restaurants. Learn what data they collect and how to protect your privacy.
Google's discontinued Nest thermostats still secretly upload home data to company servers despite losing smart features, raising serious privacy concerns.
New Android malware NGate steals NFC payment codes in real-time, allowing criminals to withdraw cash from ATMs without your card. Learn protection tips.
DoorDash confirms data breach exposing customer names, emails, addresses after social engineering attack. Learn how to protect yourself from scams.
Concerned about Google's AI scanning your Gmail? Learn how to disable Gemini features that access your emails, Drive files and Chat messages for privacy.
Google warns Android users about dangerous fake VPN apps hiding malware that steals passwords, banking details and personal data from phones and tablets.
Apple's digital passport feature lets iPhone users breeze through TSA checkpoints this holiday season using Digital ID technology at 250+ airports.
A new phishing scam targets family photos with fake "Cloud Storage Full" alerts. Criminals steal credit card information through fake sites. Learn protection tips.
South Korean scientists create ultra-thin fabric muscles that turn clothes into robotic assistants, lifting 33 pounds while weighing under half an ounce.
Archer Aviation has acquired Hawthorne Airport for $126M to launch an LA air taxi network ahead of the 2028 Olympics, featuring AI-powered eVTOL operations and next-gen aviation tech.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Fake AI apps disguised as "ChatGPT" and "DALLĀ·E" are flooding app stores with dangerous malware that steals data and monitors users without detection.
Fake buyers demand specific vehicle reports from unknown sites to steal credit card information from car sellers, but warning signs can help identify these scams before paying.

Website Conversion Rate: More Keywords Equals More Sales

Your website conversion rate should concern you. This simply refers... Read More

Non-Profits: Successful Online Strategies

More and more non-profit organizations are developing websites to help... 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

7 Ways to Gain a Professional Online Reputation

A professional online reputation is essential to the flourishing of... Read More

Five Steps to Create Your Software Product with Outsourcing

Many executives and investors are skeptical that software products can... Read More

How to Maximize the Value of Every Visitor to Your Website

While most marketers are beginning to understand the critical importance... Read More

Making the Most of Your Website: Start with the Basics

One of my most salient memories from when I sold... Read More

Ebooks for Webmasters

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

You May Be Losing Valuable Traffic - And Not Even Know It!

Here's something you may never have thought of before:If I... Read More

Ten Major Tips to Develop a Multilingual Web Site to Work

If you are living in a country that its native... Read More

Traffic for Webmasters

"If you build it, they will come"; is an age... Read More

2 Key Ways to Make Your Site a Success

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

A Web Site for Your Small Business: How to Set Up a Website

Your web site will be your window to the world.... Read More

Your Future Profit Is In The Stars

You don't believe in astrology but you check your horoscope... Read More

Why Your Business Needs a Website

Even with the steady growth of the World Wide Web,... Read More

Why Is No-one Buying From My Website?

Are you, like many other website owners, frustrated at the... Read More

Why Every Small Business Owner Needs Two Websites

Every small business owner knows that they need a website,... Read More

Beware the Software Siren

I've heard several prominent web marketers mention in their classes... Read More

Why to Have a Website for Your Company

After having decided to start a business, the next thing... Read More

How To Evaluate Your Web Sites Performance

Setting up a website is the very first step of... Read More

The Secret Benefit Of Accessibility: Part 1 - Increased Usability

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

What is SQL?

What is SQL? SQL stands for Structured Query Language and... Read More

Wheres Your Focus, Money or Customer?

Is your website Really useful?I had a 'rep' in yesterday... Read More

Make Your Web Site User-Friendly!

Making a web site is easy. Making a good web... Read More

Be Creative Before You Purchase Or Create A Website

Before you jump into spending coutnless hours on designing and... Read More

quick home cleaning Lake Forest ..