Skip to content

Instantly share code, notes, and snippets.

@girol
Created September 6, 2017 20:52
Show Gist options
  • Save girol/6b6bd6d4ee536d391d7d1ab195a03ffb to your computer and use it in GitHub Desktop.
Save girol/6b6bd6d4ee536d391d7d1ab195a03ffb to your computer and use it in GitHub Desktop.
PHP 301 HTTP Redirect
<?php
// Sets the http header to 301 - Good for search engines
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://mynewwebsite.com");
exit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment