In PHP, you can use
header function and create 301 redirect.
Here is a sample snippet.
'Location: http://example.com', true, 301); header(Code language: PHP (php)
The code below is an older version of this post.
header("HTTP/1.1 301 Moved Permanently"); header("Location: [http://example.com](http://example.com)");Code language: PHP (php)
This will redirect the PHP page you have added this into
example.com, you can change
example.com to any domain you prefer, you can do the same to file with extensions and subdomain.
Thanks to, Christian Häusler for the tip.
Thank you for reading.
I compiled a list of software and services that I use to improve my workflow, here is the link to the list.