Switch Domains on Website
I currently have a domain (www.mindfulnessinorganizations.com) redirecting to another domain website (www.mindfulnessinacademia.com). I own them both. Can I get rid of the first domain that the original website was set up under and just use the organization domain. Currently when it redirects, it resets to the academia url and some find that confusing. Thank you for your help and time!
Hello Arnel;
I originally created the website under Mindfulness in Academia, but soon started using the name Mindfulness in Organizations and have people using mindfulness in organizations.com, and that is forwarding to the original mindfulness in academia. When they type in www.mindfulnessinorganziations.com, I want that to stay the URL and not have it revert back to www.mindfulnessinacademia.com.
Christine
Hello Christine,
Thanks for clarifying the issue! Since your website code is saved under the www.mindfulnessinacademia.com URL, then you would need a redirect of some type to use a different URL for the site. This can be done within the .htaccess file. I would recommend that you remove the current redirect (it sounds like you're using one), and then use the following code. You will need to replace "example.com" and "example.net" with your respective domains. The rewrite rule is what you want to appear in the browser. The conditions are what people are typing into the browser.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.net/http://example.net/$1 [L,R=301,NC]
Basically, this code will re-write the URL in addition to re-directing them to the new domain. If you want more information you can look at this article on Setting Up a Permanent 301 Redirect in .htaccess (I'm in the process of updating this article - I'll edit my reply in a few minutes with the article link)
Regards,
Arnel C..