Re: [PHP] how to make multiple website on one host
On Feb 4, 2008 1:12 AM, jeffry s [EMAIL PROTECTED] wrote: can you tell me more about mod_rewrite? Apache can [NOTE: This is to the 1.3.x tree] http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html -- /Dan Daniel P. Brown Senior Unix Geek ? while(1) { $me = $mind--; sleep(86400); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to make multiple website on one host
jeffry s wrote: i am wondering whether this can be done. i know it can. is it possible to make one website with the ability to host multiple website. it is something like website generator. eg: www.shopify.org let say for example i have a website www.example.org. i can point a domain name (www.example1.org) to the server where www.example.org hosted, and when user visit www.example1.org, it execute the same scripts as www.example.org with with different themes and website configuration. anyone have the idea? thanks Jeffry, Yes, I built a site 7 years ago that could do this. The primary site was like and administration/management console. Then, in the background, there were a number of scripts that would run the secondary website. All the secondary websites used the same source directory. They referred to the $_SERVER['HTTP_HOST'] setting to figure out which host name they were coming from / going to. The site is still running today. Mind you that it needs some major overhauling, but it is still used by about 400 domains clients. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to make multiple website on one host
Yes you can. Just mirror the additional domains and in your PHP app check the $_SERVER[HTTP_HOST] variable. Hope this helps ! Regards, Feris http://top-10.bigspacehosting.com On Feb 3, 2008 2:20 PM, jeffry s [EMAIL PROTECTED] wrote: i am wondering whether this can be done. i know it can. is it possible to make one website with the ability to host multiple website. it is something like website generator. eg: www.shopify.org let say for example i have a website www.example.org. i can point a domain name (www.example1.org) to the server where www.example.org hosted, and when user visit www.example1.org, it execute the same scripts as www.example.org with with different themes and website configuration. anyone have the idea? thanks
Re: [PHP] how to make multiple website on one host
On Feb 4, 2008 3:33 AM, Feris Thia C. [EMAIL PROTECTED] wrote: Yes you can. Just mirror the additional domains and in your PHP app check the $_SERVER[HTTP_HOST] variable. Hope this helps ! Regards, Feris http://top-10.bigspacehosting.com On Feb 3, 2008 2:20 PM, jeffry s [EMAIL PROTECTED] wrote: i am wondering whether this can be done. i know it can. is it possible to make one website with the ability to host multiple website. it is something like website generator. eg: www.shopify.org let say for example i have a website www.example.org. i can point a domain name (www.example1.org) to the server where www.example.org hosted, and when user visit www.example1.org, it execute the same scripts as www.example.org with with different themes and website configuration. anyone have the idea? thanks great help, thanks you all.. =)
Re: [PHP] how to make multiple website on one host
On Sun, February 3, 2008 1:20 am, jeffry s wrote: i am wondering whether this can be done. i know it can. is it possible to make one website with the ability to host multiple website. it is something like website generator. eg: www.shopify.org let say for example i have a website www.example.org. i can point a domain name (www.example1.org) to the server where www.example.org hosted, and when user visit www.example1.org, it execute the same scripts as www.example.org with with different themes and website configuration. switch($_SERVER['HTTP_HOST'])){ case 'example1.org': load('example1'); break; case 'example.org': load('example'); break; } You should also consider playing games with Apache mod_rewrite -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to make multiple website on one host
can you tell me more about mod_rewrite? On Feb 4, 2008 10:52 AM, Richard Lynch [EMAIL PROTECTED] wrote: On Sun, February 3, 2008 1:20 am, jeffry s wrote: i am wondering whether this can be done. i know it can. is it possible to make one website with the ability to host multiple website. it is something like website generator. eg: www.shopify.org let say for example i have a website www.example.org. i can point a domain name (www.example1.org) to the server where www.example.org hosted, and when user visit www.example1.org, it execute the same scripts as www.example.org with with different themes and website configuration. switch($_SERVER['HTTP_HOST'])){ case 'example1.org': load('example1'); break; case 'example.org': load('example'); break; } You should also consider playing games with Apache mod_rewrite -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So?
Re: [PHP] how to make multiple website on one host
You can, in your code, check the $_SERVER super-global to see what domain name was requested. You can then branch your code however you need to, just as you can for any other conditional. Have a look at the Drupal framework, which includes that exact feature. On Sunday 03 February 2008, jeffry s wrote: i am wondering whether this can be done. i know it can. is it possible to make one website with the ability to host multiple website. it is something like website generator. eg: www.shopify.org let say for example i have a website www.example.org. i can point a domain name (www.example1.org) to the server where www.example.org hosted, and when user visit www.example1.org, it execute the same scripts as www.example.org with with different themes and website configuration. anyone have the idea? thanks -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php