We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

gbot on 03/09/08


Tagged

redirect headers


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

gbot
Nix


php redirect function


Published in: PHP 


  1. function redirect($url,$permanent = false)
  2. {
  3. if($permanent)
  4. {
  5. header('HTTP/1.1 301 Moved Permanently');
  6. }
  7. header('Location: '.$url);
  8. exit();
  9. }

Report this snippet 

You need to login to post a comment.