s
Home/Blog/PHP header redirect/

SnippetPHPTech

19 Apr 21

PHP header redirect

Here is how you can redirect to another URL with PHP.

Redirecting to another URL with PHP is very simply with the built in header Method:

<?php  
header("Location: http://example.org");  
Important: You cannot send any output prior to calling the method.