If you are going to change the name or move the location of some pages or directories, it is very important to remember that some users will still try to access the old link/url.
To make sure the users will not land at a 404 error page you need to redirect them to the new link/url.
In html or php websites you can redirect users from one url to another using the 301 redirect technique.
The 301 redirect needs be to added on the .htaccess file as follows:
#Moving a page
RedirectPermanent /old-page-name.html http://www.new-domain.com/new-directory/new-page-name.html
#Moving a directory
RedirectPermanent /old-directory http://www.new-domain.com/new-directory
# the name /old-directory is all the path of the directory after the domain:
# for example if your old path was www.domain.com/directory/old-sub-directory and you want change the subdirectory your code will be like:RedirectPermanent /directory/old-sub-directory http://www.new-domain.com/directory/new-sub-directory
#Moving an entire site
RedirectPermanent / http://www.new-domain.com/
Popularity: 2% [?]







Love never hurts; it’s the loss or the
I have a problem with my blog. ach day visit my blog in just a few people, but why the comment on my blog over the visitors who come to see my blog, does anyone know to resolve this? please help me.
Youll need to define that it is a 30-1 redirect, here is an example:
Redirect 301 /www/395/1001127/home–default.asp /
OK nice to see- new comments are always helpful! Peace.
Can you explain better?
Thanks!! Some good tips there and I’ve finally managed to get my redirects working for various directories now.
NO worries mate
my pleasure..