title: Separate different version of a website
body: <p>I want to make sure I want to optimize and make my site very easy to maintain for different version of my site.</p>
  
  <p>I have few version of my site:</p>
  
  <ul>
  <li>iphone/ipod/android etc...</li>
  <li>ipad/tablets etc...</li>
  <li>other small devices like old clap phone</li>
  <li>default </li>
  </ul>
  
  <p>I use ubuntu server with MySQL 5, PHP 5 and Apache + Memcache.</p>
  
  <p>What would be the best way to implement my site so they all use the same base functionality:</p>
  
  <ul>
  <li>PHP</li>
  <li>JS (for common)</li>
  <li>CSS (for common)</li>
  <li>etc...?</li>
  </ul>
  
  <p>thanks</p>