Redirect domain in CPanel without using htaccess so I can delete old domain

Redirect domain in CPanel without using htaccess so I can delete old domain - .htaccess files are extremely useful in many cases for users who either do not have root permissions or for users who simply aren't comfortable in making changes in their web server's configuration file. Trying to debug .htaccess not working isn't always the easiest thing to do, however, hopefully by checking the discuss below mentioned about htaccess, redirects, cpanel, , .htaccess common problems as well as the troubleshooting tips, you'll have a better grasp on what you may have to modify to get your .htaccess file running smoothly.Problem :


I have an old website that is being hosted on Apache/CPanel site. I'm being charged for hosting this site, even though it's being redirected to another site. I'd like to delete the hosting of the old domain, but it seems like the only way to redirect is via htaccess (even if I do it through CPanel). If I delete the old domain's files, that would also mean deleting the htaccess file that is doing the redirecting.


Is it possible to redirect the old website without continuing to host the old domain?


Solution :

Old website:



  • oldwebsite.tld

  • Has own cPanel account with separate cpanel username


Another website:



  • anothersite.tld

  • Has own cPanel account with separate cpanel username


To consolidate them do the following:



  • Verify that the anotherwebiste.tld cPanel account is allowed to add an additional addon domain

  • Verify that the anotherwebiste.tld cPanel account has the Addon domains feature enabled (Make sure the icon shows up)

  • Verify that you can add redirects in the Addon domain icon, or verify that the Redirects feature is enabled (make sure the icon shows up)


Then:



  • Cancel/Terminate the oldwebsite.tld cPanel account

  • Login to the cPanel account for anothersite.tld

  • Using the Addon domain icon, add oldwebsite.tld and optionally configure the oldwebsite.tld to redirect to anotherwebsite.tld

  • If you skipped the redirect configuration when adding the addon domain, you can use the Redirects icon to setup the redirect


If both domains are on the same cPanel account already, then you can't delete the hosting for one domain without deleting the hosting for the other domain.


Additionally, if you would like to do some further testing, give the htaccess tester tool a try. It allows you to specify a certain URL as well as the rules you would like to include and then shows which rules were tested, which ones met the criteria, and which ones were executed.

Comments

Popular posts from this blog

Rewrite in Mediawiki, remove index.php, .htaccess

.htaccess rewrite wildcard folder paths from host

Using .htaccess to set a cookie and 301 redirect