Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The easiest way to do this is with virtual hosting. Basically you run all the sites on one machine. The one machine has an Apache config that serves all the sites.</p> <p>If the sites are more similar than different then just point all the sites to the one directory. The PHP files can detect what site they're serving. You can provide a different header and footer for each site to handle the look and feel. You can also restrict certain pages this way.</p> <p>If the sites are more different than similar then point each to a different directory and have pages relevant to those sites in each directory.</p> <p>For common functionality you could use something like mod_rewrite to map URLs on the different sites to the same script or you could have PHP scripts at each location that include/require common functionality.</p> <p>Basically there are lots of options. Your goal should be make the site easy to maintain and keep code duplication to an absolute minimum.</p> <p>As requested, suggested reading:</p> <ul> <li><a href="http://httpd.apache.org/docs/2.0/vhosts/examples.html" rel="nofollow noreferrer">Apache virtual hosting config</a>: this is a complicated topic though so you might want to take it to Serverfault to get to the dark depths;</li> <li><a href="http://apptools.com/phptools/virtualhost.php" rel="nofollow noreferrer">Setting Up A Virtual Host in Apache</a>; and</li> <li><a href="http://www.johnrockefeller.net/php-tricks-how-to-handle-multiple-domains/" rel="nofollow noreferrer">PHP Tricks: How To Handle Multiple Domains</a>.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload