I'm doing PHP get_headers() on an mp3 file on my server and receive HTTP 404 when using the non-www address and HTTP 200 when using www.
I can access the file from either address in the browser, so why the 404? Can I fix this somehow with .htaccess?
1) WordPress is configured to use the non-www address (example.com)
2) The files are in the wp-content/uploads area of the WordPress install
3) The www subdomain has a DNS CNAME pointing to the non-www domain (www.example.com -> example.com)
Headers for: http://lhcsj.org/wp-content/uploads/2012/05/2012-5-6-sj.mp3
HTTP/1.1 404 Not Found
Date: Tue, 08 May 2012 21:11:43 GMT
Server: Apache/2.2.3 (CentOS)
Content-Length: 314
Connection: close
Content-Type: text/html; charset=iso-8859-1
Headers for: http://www.lhcsj.org/wp-content/uploads/2012/05/2012-5-6-sj.mp3
HTTP/1.1 200 OK
Date: Tue, 08 May 2012 21:08:05 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Mon, 07 May 2012 17:19:47 GMT
ETag: "9c52430-e3626f-7a1332c0"
Accept-Ranges: bytes
Content-Length: 14901871
Connection: close
Content-Type: audio/mpeg