If I change a folder name in server ant thus the URL will be changed, could I perform 301 redirection or this is only for the case that the web page has been transferred to another folder?
If the URL has changed, you'll need a redirect. If a certain page was in site.com/folder1 before and is now in site.com.folder2, you'll need to redirect it. A 301 redirect is for the case that a page has been transferred to another folder, but for all practical purposes, changing the folders name is the same as putting the files in a different folder.
Entire folders can be redirected, just like files can. You can add a line like this to
Which will cause every file in the directory to be 301 redirected:
This is documented in Apache's mod_alias redirect documentation
|show 2 more comments|