title: AWS Cloudfront behaviors not working as expected
body: <p>I have a PHP app on AWS Elastic Beanstalk, I have created an assets bucket on S3. I'm trying to setup a Cloudfront distribution with behaviors to send requests for assets/* to S3 with a default behavior to send requests to EB.  The domain points to Cloudfront.</p>
  
  <p>All requests are going to EB which returns a 404 since there is no assets diretory in the EB environment.</p>
  
  <p>I have created 2 Cloudfront origins, one for EB and one for the S3 bucket. This is what my behaviors look like:</p>
  
  <pre><code>Precedence  Path Pattern  Origin                                          Protocol Policy   Fwd Query Strings
  0           assets/*      S3-example-bucket                               HTTP and HTTPS    No
  1           Default (*)   Custom-example.us-east-1.elasticbeanstalk.com   HTTP and HTTPS    Yes
  </code></pre>
  
  <p>It seems as though this should be pretty straight forward so I assume I'm missing something basic.  Any help is greatly appreciated.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Request header:</p>
  
  <pre><code>GET /assets/images/10waysaudiobook.png HTTP/1.1
  Host: example.com
  User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Language: en-US,en;q=0.5
  Accept-Encoding: gzip, deflate
  Cookie: wordpress_logged_in_8a27500b7747be1e4fbad7f473f238e5=snickerspixy%7C1466021823%7Cr7rE5moINjanjHEqb1TGbsSkn9F7OCZLfX69IbcnGJu%7C28fc452885f3fe6e954243abab585a188f6511cdd6eeec6fa5ec5c50b9f3d393; wp-settings-7674=m4%3Do%26m5%3Do%26m9%3Do%26m6%3Do%26editor%3Dhtml%26m10%3Do%26m0%3Do%26m3%3Do%26hidetb%3D1%26m2%3Dc%26m1%3Do%26m8%3Do%26m12%3Do%26m7%3Do%26m11%3Do%26urlbutton%3Dnone%26m13%3Do%26tml1%3D1%26imgsize%3Dfull%26align%3Dcenter%26libraryContent%3Dbrowse%26ed_size%3D569%26unfold%3D1%26wplink%3D1%26mfold%3Do%26post_dfw%3Doff%26advImgDetails%3Dshow%26posts_list_mode%3Dlist; wp-settings-time-7674=1464816549; AWSELB=1FCB85F51606EBAFF15FEADB01C8069AEDE17E2A043407E615EF1A0E1ABF24607545A45D3DC206631F7AAE4503ADA423788B5E6B5B48FAE93EE916DE068509E64F92AC10FF; PHPSESSID=cpi2su7s967phu87rlpjgneel6; wordpress_test_cookie=WP+Cookie+check
  Connection: keep-alive
  </code></pre>
  
  <p>Response header:</p>
  
  <pre><code>HTTP/1.1 404 Not Found
  Cache-Control: no-cache, must-revalidate, max-age=0
  Content-Type: text/html; charset=UTF-8
  Date: Sun, 05 Jun 2016 00:54:23 GMT
  Expires: Wed, 11 Jan 1984 05:00:00 GMT
  Link: &lt;http://example.com/wp-json/&gt;; rel="https://api.w.org/"
  Pragma: no-cache
  Server: Apache
  Transfer-Encoding: chunked
  Connection: keep-alive
  </code></pre>