php redirect function


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.