In order to permanently redirect website to another URL we can use PHP code. To do this simple task place an index.php ( make sure that you do not overwrite your current index.php ) file into a root directory of your website. The following code will redirect any traffic to your main page to https://jobs.linuxcareers.com .
1 2 3 4
Save the above into index.php within your site’s root directory. NOTE: The above code will not redirect traffic coming to other URLs than your main page. URLs like: http://example.com/some-other-page/ will not be redirected. For this it is better to use Apache’s .htaccess file like:
or even better is to add these lines to apache’s virtual host definition file to save some runtime.