Skip to main content
Topic: Access forum from multiple URLs (Read 326 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Access forum from multiple URLs

May i come back to an issue i have adressed in my very first postin here?

Quote
n SMF 1.1 and, AFAIK, also 2.0.x the server URL and the path to the installation directory are kept in the database at various places. This make the use of a dev platform difficult - the forum cannot just be moved to a different place / domain without editing the database. i know that it can be done piping the database dump through sed, but i do not like that. How does Elk behave in this respect?

Unfortunately i need exactly that - access the forum from two base URLs. Background: i am losing the domain name of this forum (the owner gives it up and two brokers interfere and want $$),. It looks as if my KK/Auth procedure will fail although i have the appropriate auth code.

Therefore and i want to set up a temporary workaround: access the forum from a 2nd URL which is under my control (on a different server). I have already set up a reverse NGINX proxy for the new domain, but of course all URLs from the forum use the hard coded base URL.
So i am looking for any way to change this.

And of course i would like to have full access to the forum from both base urls as long as the old one exists - giving users a time to transition is really important to me.

AFAIK, Elk does not support replacing the base URL by a PHP variable (as Drupal does) - which would solve my problem. Any idea?

Re: Access forum from multiple URLs

Reply #1
Hi bea, sorry to hear this, but I'm sure we'll find a solution.

To move a forum from one server to another or different domain you can use repair-settings.php. Not as easy as Joomla or other cms /forum but does the job. There is no need and it is not indicated to edit the database tables. I did this more than once on smf/elkarte.

Just a few questions to understand better your situation:
1. you are not the owner of that domain, right?
2. the domain is still active or has expired? someone registered it?
3. have you asked the owner of the domain if he wants to give or sell it o you?
4. Have you considered that accessing your forum from two different domains will result in duplicate content in search engines?
 
If there are non chances to became the owner of the domanin where your forum is hosted, and If you can still use the old domain for a month or more I will proceed in this way:
1. buy a new domain
2. buy a new hosting
3. do a full backup of your forum, database and ftp files
4. restore the database and ftp files to your new host/domain.
5 use repair-settings.php to correct the paths. You can find it here https://tools.elkarte.net/2014/12/repair_settings
6. at this point you will have a working forum hosted on your new host / domain.
7. Important step, upload an .htaccess file to the root of your old forum, in this way you tell search engines that your forum has moved to a new domain and will also redirect visitors to the new domain.
example: old-domain.com/index.php?topic=5 will redirect visitors to new-domain/index.php?topic=5
the .htaccess file should only contain:
Code: [Select]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.newdomain.com$ [NC]
RewriteRule ^(.*)$ https://www.newdomain.com/$1 [R=301,L]
</IfModule>
8. At this point you will have your forum to your new domain and also accessible from your old domain. You can also run some queries on posts, PM, drafts, signature, etc and replace your old domain with the new one. If you are interested I can post them all.
sorry for my bad english

Re: Access forum from multiple URLs

Reply #2
Hi,

first to your questions:

1) yes, i am not the owner of the domain.
The owner is the founder of that forum which exists for more than 10 years.

2) the domain is still active. According to WHOIS it has been updated in August for one other year.
Which should mean that the domain should be usable until forthcoming August, shouldn't it?
Anyway, i am skeptical on what might happen in the future. No trust in the processes anymore - the internet has changed radically to solely commercial interest (and almost everything else appears to be blocked by the search engines).

3) the owner of the domain has offered me the transfer free of charge. He did already send me the AUTH code. I started the transfer process on Sep 18, so it will expire on Oct, 18.
As it is a .com domain, the owner must confirm to my transfer request by main, right? And that's one of the possible points of failure...

In the meantime, 2 (!) apparently independent domain brokers offer me the domain. I don't know if any of the two can interfere into the transfer process, so i try to keep them nagging. But if course i am not willing to pay a cent to some 3rd party guy.

4) yes i am aware. my impression is that it is not very relevant to the search engines any more, especially as a through out any google ad and other spyware stuff a while ago, still on SMF 1.1.16.

Anyway - changing an old domain name well established within a community is a critical step which more or less requires the use of both domains for some time. And maybe to advice the search robots not to access one of the two. in order to avoid duplicate content.



Backing up the site and upgrading it is an important step for the near future; i've been a bit lazy over last summer.

BTW: using nginx there is actually a way to access an Elk or SMF forum under a different domain: set up a reverse proxy with content rewriting for the 2nd domain. The latter set up to rewrite all references to the old domain into the new domain. Not too elegant, but feasible as long as the traffic is not too large. Meanwhile i have this up and running, except for the certificates. But a solution within Elk would be more elegant.

Re: Access forum from multiple URLs

Reply #3
I did not sold or released to someone a domain, so I'm not sure if the owner should approve first, but I imagine it works as you described. Instead I bought/received a couple of domains. As far as I remember, once received the auth code, you need to register that domain choosing the option to transfer it and you will be asked for the auth code, once you type the auth code you should contact the owner and ask him to approve the transfer.
In the meantime, 2 (!) apparently independent domain brokers offer me the domain. I don't know if any of the two can interfere into the transfer process, so i try to keep them nagging. But if course i am not willing to pay a cent to some 3rd party guy.
That's strange, don't pay them... if you already did a whois what info do you see about the owner (if it's not hidden info, those info can be hidden if the owner choose this option). In whois info do you see the name/contact of the owner you know or different info? If the first one you can ignore the two "brokers"

No trust in the processes anymore - the internet has changed radically to solely commercial interest (and almost everything else appears to be blocked by the search engines).
let's solve first the problem with the domain, then you can describe in another topic what happens on that forum  ;)

Anyway - changing an old domain name well established within a community is a critical step which more or less requires the use of both domains for some time. And maybe to advice the search robots not to access one of the two. in order to avoid duplicate content.
Not so critical as you think, a couple of months ago I changed the domain name of my forum established back in 2007, and only a few users noticed that. I still have the old domain which redirects all the traffic to my new domain with an .htaccess file, as I described in the previous post. https://www.elkarte.net/community/index.php?topic=3965.0

BTW: using nginx there is actually a way to access an Elk or SMF forum under a different domain: set up a reverse proxy with content rewriting for the 2nd domain.
Sory but I have no knowledge on this

 
sorry for my bad english

Re: Access forum from multiple URLs

Reply #4

BTW: using nginx there is actually a way to access an Elk or SMF forum under a different domain: set up a reverse proxy with content rewriting for the 2nd domain.
Sory but I have no knowledge on this

 

But i have succeeded doing this, at least on http level. And of course can provide a template for nginx.conf if needed by someone.

What of course will (cannot) be  proxied is the email notification stuff. But email runs on one of my own domains anyway.