News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Dual domains?

Started by oR_chewie, July 31, 2008, 05:08:32 PM

Previous topic - Next topic

oR_chewie

Hi, I have a website using SMF. My primary domain uses a "-" in the name, and the same name without the "-" was released and i purchased it. I want to use both domains on my website, but SMF needs a board URL setting to work, is there a way to set it so that it can use BOTH domain names?

thx for any help

Deprecated

It would be a lot easier to just set your less favored domain to forward to your favored domain. You could do that easily with a short .htaccess file, just a few lines, assuming you have Apache of course. Probably take 5 minutes to write it and get it working.

oR_chewie

the thing is that the less favorited is the domain that has all the stats from website. i will be having the old domain active until it is released (in about 8months) i wanted to make the transition less drastic.

so in other words i will have both domains for at least 8 months. in my website pages outside of forums both domains can co-exist, but in SMF because of the board URL variable is not possible as for now.

Deprecated

In that case you want to put it on permanent forward:

QuoteYou've just redesigned some pages of your web site. The
pages have high search engine rankings that you don't want
to lose. How can you safely redirect web site traffic from
your old pages to the new pages without losing your
rankings? You can do this by using a " 301 redirect "

What is 301 redirect?

301 redirect is the best method to preserve your current
search engine rankings when redirecting web pages or a web
site. The code "301" is interpreted as "moved permanently".
After the code, the URL of the missing or renamed page is
noted, followed by a space, then followed by the new
location or file name. You implement the 301 redirect by
creating a .htaccess file.

Read this site: http://www.isitebuild.com/301-redirect.htm

oR_chewie

Quote from: Deprecated on July 31, 2008, 07:25:13 PM
In that case you want to put it on permanent forward:

QuoteYou've just redesigned some pages of your web site. The
pages have high search engine rankings that you don't want
to lose. How can you safely redirect web site traffic from
your old pages to the new pages without losing your
rankings? You can do this by using a " 301 redirect "

What is 301 redirect?

301 redirect is the best method to preserve your current
search engine rankings when redirecting web pages or a web
site. The code "301" is interpreted as "moved permanently".
After the code, the URL of the missing or renamed page is
noted, followed by a space, then followed by the new
location or file name. You implement the 301 redirect by
creating a .htaccess file.

Read this site: hxxp:www.isitebuild.com/301-redirect.htm [nonactive]

this is the best answer yet, I told my hosting support to do something like this but I dont know what did they messed up and now my website is down, have been waiting for over 3 hours and no reply.

thx for the answer

Deprecated

If you have FTP access you might be able to download your .htaccess file and upload it here, then I or somebody else can make the changes and upload it back here, then you back to your site. It's just like one or two lines, no big deal.

The only problem would be that some hosting accounts don't seem to be able to tinker with their .htaccess files. I think it might be permissions or something. I've never had that problem but hear about it from time to time.

And that won't fix your site being down unless the .htaccess file is the cause of your outage. Might be worth looking at even if you don't want to change it.

Jeez, your hosting is as bad as mine. My friend and I have 6 sites on the same server, and 4 of them are out, including his SMF and my SMF, been down several hours now, I'm getting emails from my members... :(

oR_chewie

Quote from: Deprecated on August 01, 2008, 05:22:00 PM
If you have FTP access you might be able to download your .htaccess file and upload it here, then I or somebody else can make the changes and upload it back here, then you back to your site. It's just like one or two lines, no big deal.

The only problem would be that some hosting accounts don't seem to be able to tinker with their .htaccess files. I think it might be permissions or something. I've never had that problem but hear about it from time to time.

And that won't fix your site being down unless the .htaccess file is the cause of your outage. Might be worth looking at even if you don't want to change it.

Jeez, your hosting is as bad as mine. My friend and I have 6 sites on the same server, and 4 of them are out, including his SMF and my SMF, been down several hours now, I'm getting emails from my members... :(

you would not believe me if I told you, my website was dead for at least 30 hours, I will search for new hosting service, and if someone is asking themselves what´s that´s guys hosting service its hxxp:www.lunarpages.com [nonactive] and i had recommend it to many friends but now, would not recommend it if they pay me. incredible how bad they messed me up, got calls from my web sponsors all day, almost lost two of them.

Back to the issue, yes i can download the .htaccess file and modify it, but site is online, but ftp access is very very crappy right now.

Deprecated

Quote from: oR_chewie on August 02, 2008, 12:19:43 PMBack to the issue, yes i can download the .htaccess file and modify it, but site is online, but ftp access is very very crappy right now.

Well get it here when you can. I'm no Apache wizard but I've played with my own .htaccess to add lots of functionality, and I've got google if there's any part of your file I don't understand. I'm sure there are .htaccess experts here at SMF who could also help you.

In fact I just forwarded one of my domains this morning using .htaccess

QuoteRewriteEngine on
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

Make a directory on your host's server for the old domain, change example.com to the URL you want to obsolete (i.e. to deprecate, lol) and put that .htaccess in the directory with nothing else needed, no files, nothing.

You will have your newer, preferred domain directed to a different directory on your server and I don't expect anything needs to be changed there.

We should still have a look at your .htaccess in your forum directory to make sure that there is nothing there to mess things up. As I said earlier in this thread it appears to me that your headers are borked, and I'm fairly suspicious they are borken because of your .htaccess file.

I'll be back when you post again. Bye! :)

Advertisement: