From time to time, pages change location. At times like these, one can use PHP header function with 301 redirect to notify website visitors that the page has moved, assuming the $location contains the new URL.

Here is how you can use PHP header 301 redirect

  header ('HTTP/1.1 301 Moved Permanently');
  header ('Location: '.$location);

More information about PHP header function can be obtained at

Dima Svirid

Software architect, JAVA, Spring, Hibernate, AngularJs, Backbone, MongoDB, Oracle. CTO and Co-Founder of

More Posts

Follow Me:

Tagged with: