apache tutorial - 301 Redirection by Htaccess - apache - apache web server - apache server - apache2
301 Redirection by Htaccess in Apache
The HTTP response status code 301 Moved Permanently is used for permanent URL redirection, meaning current links or records using the URL that the response is received for should be updated. The new URL should be provided in the Location field included with the response. The 301 redirect is considered a best practice for upgrading users from HTTP to HTTPS. write this code in htaccess file for PHP-APACHE
Example