Mobile app version of vmapp.org
Login or Join
Angela700

: Change folder name in server 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

@Angela700

Posted in: #301Redirect

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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Angela700

2 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

Entire folders can be redirected, just like files can. You can add a line like this to .htaccess:

Redirect permanent /OLD example.com/NEW

Which will cause every file in the directory to be 301 redirected:

example.com/OLD/page_one.html -> example.com/NEW/page_one.html http://example.com/OLD/page_two.html -> example.com/NEW/page_two.html http://example.com/OLD/an_image.png -> example.com/NEW/an_image.png

This is documented in Apache's mod_alias redirect documentation

10% popularity Vote Up Vote Down


 

@Samaraweera270

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme