Multiple sites

Permalink
For various reasons I will have the need to build multiple sites below a top level domain. The top level domain runs a full membership system which they log into UN/PW. Is there a simple way to re-direct to a sub domain without having the user re-enter their UN/PW? i.e. the sub domain has no public access. I did wonder about just allowing a single URL access.

Anyone had a similar situation.

Thanks in advance,

PY2K

 
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
There is an add-on in the marketplace that allows you to manage multiple sites. It's called Domain Mapper. If you use that, you could password protect the subdomain. Here is a link to the Domain Mapper add-on:
http://www.concrete5.org/marketplace/addons/domain_mapper/...

Alternatively, the only other way that I can think of would be to do another installation of Concrete on the subdomain. Then, you could use the FREE Page Redirect add-on to redirect users to a login page (or, you could simply have the home page on the sub-domain only have a login block).
Here's a link to the Page Redirect add-on:
http://www.concrete5.org/marketplace/addons/redirect1/...

I hope this helps a bit.
py2k66 replied on at Permalink Reply
Hi Grouthcurve,

Thank you for your post and help.
I have looked at Domain Mapper but I don't know if it will do what I need. I will read it again from your advice. Domain Mapper may be the solution if it is able to use the C5 UN/PW on the sub-domain as you suggest. I will message the core team and ask if need be.

Your other suggestion is one of my solutions. I could use the page re-direct block sends the user to the sub-domain, you export the specific user names to the sub domain and they have login access using their original UN/PW but they have to enter it again. I can also use a simple hyperlink, same thing, just the user decides when. Its that second login I am trying to avoid.

As usual, the C5 community to the rescue, thanks again Grothcurve, I am grateful.
hereNT replied on at Permalink Reply
hereNT
Domain mapper just allows you to map a landing page to a page in your site map, after you hit that landing page once you navigate your urls are subdomain.com/then/whatever/path/to/the/page. I didn't really like that aspect of it too much.
py2k66 replied on at Permalink Reply
Hi hereNT,

If its just a member login that I need from the top level to a sub the path should be subdomain.com/index.php/login, if domain mapper uses the same login credentials and sets cookies it may not even need that. Everything needs an URL.

Thank you for your post and time, appreciated.
mkly replied on at Permalink Reply
mkly
The restricted access could be difficult because it sounds like you are doing two different authentications. I take it that this "full membership system" is a totally separate(not concrete5 based) system?

You can log a user into concrete5 without using the password via
// the true is for login
User::getByUserID($uID, true);

That will log in the user and give them the session cookie.

You need to load a couple libraries to call and make sure that each finds the right database but it wouldn't be impossible if you are able to modify and extend your full membership login system.

You would also probably want setup a custom login.php single page to serve your full membership form instead of the concrete5 login.

Other than that
define('REDIRECT_TO_BASE_URL', false);

should help to prevent and issues you have with different domains. Also BASE_URL and possibly DIR_REL

Wish I could be more specific, good luck.
py2k66 replied on at Permalink Reply
Thanks mkly,

Sorry my fault, its all C5 and C5 members systems. This may sound odd, I can read your/the code and I understand what its doing (I haven't done any programming in 20 years) plus; I know its an elegant solution. At this moment in time I can't implement it. I need to set up a sandbox top level and a couple of subs do some reading then play with what you have told me.

Thank you for your time and help, always grateful.