title: .htaccess, YSlow, and "Use cookie-free domains"
body: <p>One of YSlow's measurables is to use cookie-free domains to serve static files.</p>
  
  <blockquote>
    <p>"When the browser requests a static
    image and sends cookies with the
    request, the server ignores the
    cookies. These cookies are unnecessary
    network traffic. To workaround this
    problem, make sure that static
    components are requested with
    cookie-free requests <strong>by creating a
    subdomain and hosting them there</strong>." --
    Yahoo YSlow</p>
  </blockquote>
  
  <p>I interpret this to mean that I could experience performance gains if I move <em>www.example.com/images</em> to <em>static.example.com/images</em>.</p>
  
  <p>Although this is easy to do, I would lose the handy ability within my content management system (Joomla/WordPress) to easily reference and link to these images.</p>
  
  <p>Is it possible to use .htaccess to redirect all requests for a particular folder on <em>www.example.com</em> to a folder on <em>static.example.com</em> instead? Would this method also fool the CMS into thinking the images were located in the default locations on its own domain?</p>