Quick and easy htaccess code snippet to save you some negative points when doing website redesigns or changing filenames on your websites. This is a GOOGLE friendly way of redirecting your old file locations to new ones. Google typically picks up on these in about a week or two after you first upload.

You can toss this in your .htaccess to tell your server where to send your clients when they try and access a file.  This is called a <b>301 redirect</b>, which essentially tells search engines and browsers that your file has been <b>temporarily moved</b>.

redirect 301 /folder/filename.html http://domain.com/newfolder/newfilename.php

This also works if you want to redirect a folder.

redirect 301 /folder/ http://domain.com/newfolder/

As always, you can put as many of these as necessary in your htaccess file. I have a client with a good twenty or thirty of these with no issues. Just make sure you don't accidentally redirect a file or folder that is in use.