Форуми / Cotonti / Support / muilti domain

CJ
#1 01.08.2011 18:55

in the config file it says

$cfg['mainurl'] = 'domain name'

is there a way to add more like

 

$cfg['suburl'] or something like that so they all link to the the same folder ?

Twiebie
#2 01.08.2011 19:18

Not sure what you mean?

CJ
#3 01.08.2011 19:25

i have 3 domains that link to one signal site, but if u go on any of the other links it shows your logged off. if u go on that main URL your logined, so is there a way yo have all my domains set like the main one

Twiebie
#4 01.08.2011 19:32

Would a simple redirect not sort this out?

CJ
#5 01.08.2011 19:36

no cause then links in my downloads wont work cause ther from  PFS using full links.

Twiebie
#6 01.08.2011 19:37

How exactly do you have your website set-up with multiple domains?

CJ
#7 01.08.2011 19:38

cause the old site we login from any of the links and it wouls stay logged in. on all of them

Added 54 seconds later:

on the Site host there all domains that link to the main Folder (ftp) but dont redirect

Added 1 minute later:

watch

www.lamaperformance.com

www.street-legal-mods.com

www.streetlegalmods.com

 

 

then GOM-Team.com redirects to www.street-legal-mods.com

Twiebie
#8 01.08.2011 19:53

I might be completely wrong, but as far as I can see they are all the exact same websites, with streetlegalmods.com being the main one.

Why not just redirect all URL's to one domain (streetlegalmods.com)?

So everyone that visits for example lamaperformance.com automatically goes to streetlegalmods.com.

CJ
#9 01.08.2011 19:58

like i said earlier, ther are links in the download area and all that, that if i redirect to the main site makes it so i have to go fix all thos links. i rather it so people can log on from any of thos links and go though the eniter site without having to be on the Main URL

Added 1 minute later:

cause thats what we did when we had LDU and we updated about 2 -4 months ago so, there were people who used lama and Street-legal

GHengeveld
#10 01.08.2011 20:02

Shared login over multiple domains isn't possible, simply because the cookie set for one domain cannot be accessed through another domain (it's just how the web works). The best option, that is also much better in terms of SEO is to pick one domain to host the site, and redirect all others to that domain. You can put this in your .htaccess 

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.streetlegalmods.com$ [NC]
RewriteRule ^(.*)$ http://www.streetlegalmods.com/$1 [R=301]
As for the download links, you can add some conditions to catch those addresses so they keep working.

 


Відредаговано: Koradhil (01.08.2011 20:10, 13 років тому)
CJ
#11 01.08.2011 20:10

no i dont want shared, i want it so u can access the site from any link and it will stay logged in if u login on that domain

GHengeveld
#12 01.08.2011 20:15

You can try this:

$cfg['mainurl'] = 'http://' . $_SERVER['HTTP_HOST'];

I wouldn't recommend it though. Also make sure you have no 'domain for cookies' configured in admin->config->main so it will automatically pick the right domain name.

CJ
#13 01.08.2011 20:16

ill test that