Skip to main content
Commonmark migration
Source Link

WAY #1 - cPanel

###WAY #1 - cPanel### II assume your host is using cPanel managing your Server.

Browse domainname.com/cpanel, login their with cPanel credential:
enter image description here

Change the values according the following image:
enter image description here

Don't forget to check the "Wildcard Redirect" to redirect all the subfolder/subpages also (Thanks to @RobertHue). Add the redirection and you are done.

WAY #2 - .htaccess

###WAY #2 - .htaccess### OpenOpen up your .htaccess of domainname.com/blog/ in edit mode. Put the following code there (I made it using WebConfs.com Redirect Generator):

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://newdomainname.com/$1 [R=301,L]

Save it. And yala!

EDIT

##EDIT## That'sThat's well said by @RobertHue. I did not mention the subfolder or subpages redirection. So I edited my answer, changed the attached images and posted new code. Thanks a lot @RobertHue for pointing the important things.

###WAY #1 - cPanel### I assume your host is using cPanel managing your Server.

Browse domainname.com/cpanel, login their with cPanel credential:
enter image description here

Change the values according the following image:
enter image description here

Don't forget to check the "Wildcard Redirect" to redirect all the subfolder/subpages also (Thanks to @RobertHue). Add the redirection and you are done.

###WAY #2 - .htaccess### Open up your .htaccess of domainname.com/blog/ in edit mode. Put the following code there (I made it using WebConfs.com Redirect Generator):

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://newdomainname.com/$1 [R=301,L]

Save it. And yala!

##EDIT## That's well said by @RobertHue. I did not mention the subfolder or subpages redirection. So I edited my answer, changed the attached images and posted new code. Thanks a lot @RobertHue for pointing the important things.

WAY #1 - cPanel

I assume your host is using cPanel managing your Server.

Browse domainname.com/cpanel, login their with cPanel credential:
enter image description here

Change the values according the following image:
enter image description here

Don't forget to check the "Wildcard Redirect" to redirect all the subfolder/subpages also (Thanks to @RobertHue). Add the redirection and you are done.

WAY #2 - .htaccess

Open up your .htaccess of domainname.com/blog/ in edit mode. Put the following code there (I made it using WebConfs.com Redirect Generator):

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://newdomainname.com/$1 [R=301,L]

Save it. And yala!

EDIT

That's well said by @RobertHue. I did not mention the subfolder or subpages redirection. So I edited my answer, changed the attached images and posted new code. Thanks a lot @RobertHue for pointing the important things.

Thanks RobertHue
Source Link
Mayeenul Islam
  • 12.9k
  • 21
  • 85
  • 169

###WAY #1 - cPanel### I assume your host is using cPanel managing your Server.

Browse domainname.com/cpanel, login their with cPanel credential:
enter image description here

Change the values according the following image:
enter image description hereenter image description here

AddDon't forget to check the "Wildcard Redirect" to redirect all the subfolder/subpages also (Thanks to @RobertHue). Add the redirection and you are done.

###WAY #2 - .htaccess### Open up your .htaccess of domainname.com/blog/ in edit mode. Put the following code there (I made it using RapidTables Redirect GeneratorWebConfs.com Redirect Generator):

RedirectOptions 301+FollowSymLinks
RewriteEngine /blog/on
RewriteRule (.*) http://newdomainname.com/$1 [R=301,L]

Save it. And yala!

##EDIT## That's well said by @RobertHue. I did not mention the subfolder or subpages redirection. So I edited my answer, changed the attached images and posted new code. Thanks a lot @RobertHue for pointing the important things.

###WAY #1 - cPanel### I assume your host is using cPanel managing your Server.

Browse domainname.com/cpanel, login their with cPanel credential:
enter image description here

Change the values according the following image:
enter image description here

Add the redirection and you are done.

###WAY #2 - .htaccess### Open up your .htaccess of domainname.com/blog in edit mode. Put the following code there (I made it using RapidTables Redirect Generator):

Redirect 301 /blog/ http://newdomainname.com

Save it. And yala!

###WAY #1 - cPanel### I assume your host is using cPanel managing your Server.

Browse domainname.com/cpanel, login their with cPanel credential:
enter image description here

Change the values according the following image:
enter image description here

Don't forget to check the "Wildcard Redirect" to redirect all the subfolder/subpages also (Thanks to @RobertHue). Add the redirection and you are done.

###WAY #2 - .htaccess### Open up your .htaccess of domainname.com/blog/ in edit mode. Put the following code there (I made it using WebConfs.com Redirect Generator):

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://newdomainname.com/$1 [R=301,L]

Save it. And yala!

##EDIT## That's well said by @RobertHue. I did not mention the subfolder or subpages redirection. So I edited my answer, changed the attached images and posted new code. Thanks a lot @RobertHue for pointing the important things.

Source Link
Mayeenul Islam
  • 12.9k
  • 21
  • 85
  • 169

###WAY #1 - cPanel### I assume your host is using cPanel managing your Server.

Browse domainname.com/cpanel, login their with cPanel credential:
enter image description here

Change the values according the following image:
enter image description here

Add the redirection and you are done.

###WAY #2 - .htaccess### Open up your .htaccess of domainname.com/blog in edit mode. Put the following code there (I made it using RapidTables Redirect Generator):

Redirect 301 /blog/ http://newdomainname.com

Save it. And yala!