Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

How to redirect user to another URL in PHP

Answer:

Assume you have a redirect.php, and want to redirect user to Google, use the following codes:

<?php

    header("Location: http://www.google.com");

  1. Add custom HTTP header by nginx
  2. How to redirect error message to a file
  3. How to redirect output to more than one place
  4. Enable Expire header in Nginx
  5. How to simulate curl using wget command?

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>