Welcome Guest, Not a member yet? Register   Sign In
make mydomain.com and secure.mydomain.com use the same codeigniter application
#1

[eluser]Unknown[/eluser]
I have just set up a new website www.mydomain.com and as well as a SSL enabled sub-domain secure.mydomain.com. Both www.mydomain.com and secure.mydomain.com need to have the same configuration. I could duplicate the Codeigniter application directory and system directory over to secure.mydomain.com however any changes I make on one I will need to change on the other.

Does anyone know how I can make it so that secure.mydomain.com can access the same Codeigniter application without unnecessarily duplicating the folders?

Thank you.
#2

[eluser]smilie[/eluser]
Do you mean both sub-domains (www. and secure.) will show same page / website?
If this is the case, I would strongly recommend using DNS forward / CNAME to achieve this. Reason for this is speed, performance and Google as well. So, in your DNS you just 'point' one sub-domain to another, for example www.domain.com IN CNAME secure.domain.com

Then you just set up your CI installation to 'listen' to secure.domain.com and no problems :-)

If they are two different websites / functionality, then you can not avoid having 2 application directories. You can use one and same CI library directory, but you must have two application directories.

Cheers,
Smilie
#3

[eluser]NotDior[/eluser]
Another option that I think would work is to extract your system folder out to some common location and then just setup the index.php files in each site (so two of those) to reference the common location. now that doesn't take care of CSS/JS etc etc, but something to consider.
#4

[eluser]kirkaracha[/eluser]
Managing your Applications in the User Guide has info on Running Multiple Applications with one CodeIgniter Installation.




Theme © iAndrew 2016 - Forum software by © MyBB