I recently had someone ask me if they could set the priority of some pages. In this specific case they wanted index.php to take precedence over index.html. Well, on shared hosting you can’t change the server config to do this (which by the way is in the httpd.conf for Apache). So the next best thing to do is .htaccess redirects.
htaccess will only work on Apache webservers, if in doubt consult your webhost. To use these, you will need to create a text file and call it htaccess. Input code from below into it to suit your needs, and upload to your site via ftp. You will then need to rename the file to .htaccess
There are a couple different codes that are returned to the browser on redirects.
301 – Permanent Redirect. Good for moving files forever. This tells the search engine and clients that it has moved permanently and should use the new URI.
302 – Temporary Redirect. It tells the search engine and client that it’s redirecting and should continue to use the requested URI.
Here are some sample redirect usages:
301 Moving a single page
Redirect 301 /oldpage.html http://www.example.com/newpage.html
301 Move entire site
Redirect 301 / http://www.example.com/
To do 302 redirects, just replace 301 with 302.






