Skip to content

How to redirect user to another URL in PHP

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");

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  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. Execute command as another user
  5. How to check which directory used up most of the disk space?

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*