Imagine this, you have a file http://www.domain.com/hosting.php and it is indexed by google. But one day you rename the file into http://www.domain.com/myhosting.php. This means that http://www.domain.com/hosting.php does not exist any more. You need to google and your website visitor to go to the new file. The smoothest way to redirect your visitors is to use an .htaccess file. The server checks first for an .htaccess file. So the old page nerver loads, and the visitors are sent directly to the new page.
The code is: