My clan's website currently has a domain name that we want to change.
Right now it's setup so that:
http://www.domain1.com redirects to http://domain1.com
http://www.domain2.com redirects to http://domain1.com
http://domain2.com redirects to http://domain1.com
How can we change this so that our domain2 is the main domain name?
http://domain2.com redirects to http://www.domain2.com
http://www.domain1.com redirects to http://www.domain2.com
http://domain1.com redirects to http://www.domain2.com
Thanks in advance
Changing Primary Domain
- HoLyCoW
- A regular
- Posts: 32
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Sat Jul 21, 2012 11:38 pm
Re: Changing Primary Domain
It depends on how you have the redirect set up and your application. Are you running this on our webhosting here?
Re: Changing Primary Domain
Yes, the webhosting is currently done by nuclear fallout.
Here's my clan's current setup:

Here's my clan's current setup:

Re: Changing Primary Domain
Do you have the redirect set up through an .htaccess file, or is it through your application settings?
Re: Changing Primary Domain
Well there are no .htaccess files, so it would have to be through the application.
Re: Changing Primary Domain
Are you certain that file doesn't exist? It is hidden by default and can only be seen with an FTP client enabled to show hidden files.
TimeX
Re: Changing Primary Domain
Yeah, I have my ftp client setup to show hidden files.
Re: Changing Primary Domain
Then create an .htacess file with the redirects.HoLyCoW wrote:Yeah, I have my ftp client setup to show hidden files.


Re: Changing Primary Domain
But now with no .htaccess file, it automatically goes to domain1.com
So, wouldn't that create an infinite loop if I redirect domain1.com to domain2.com?
If I create the .htacess file, would this be sufficient?
.htaccess
So, wouldn't that create an infinite loop if I redirect domain1.com to domain2.com?
If I create the .htacess file, would this be sufficient?
.htaccess
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.domain1.com$ [NC]
RewriteRule ^(.*)$ http://www.domain2.com/$1 [R=301,L]
</IfModule>
Re: Changing Primary Domain
If going to domain2 automatically redirects to domain1 right now, then you will have to look in your application for a setting for this. In phpbb, for instance, it would be under Server Settings->Domain name in the ACP.