Forum Moderators: phranque
http://www.example.com/image.jpg
GET /image.jpg HTTP/1.1
Host: www.example.com
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.5
Accept: image/png,image/*;q=0.8,*/*;q=0.5
User-Agent: some user agent(whatever)
Referer: http://www.example.com/some-page
Connection: keep-alive
Cache-Control: max-age=0 <------ Where is this coming from ?
HTTP/1.1 200 OK
Date: Tue, 08 Mar 2016 23:02:36 GMT
Server: Apache
Accept-Ranges: bytes
Content-Length: 32176
Cache-Control: max-age=31530000 <---- CORRECT (1 yr)
Vary: Accept-Encoding
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: image/jpeg <FilesMatch "\.(jpg|jpeg|png|gif|ico|css)$">
Header set Cache-Control "max-age=31530000"
</FilesMatch> but only for images and css/js files
Connection: keep-aliveDo they all say this, or is it just the random two you quoted? Mine never-- I mean literally never, I checked-- say anything but "close". Making me wonder what's the point of even having the header, if even the crudest robot just says the same thing. What do the page request headers say?
Connection: keep-alive
Do they all say this, or is it just the random two you quoted? Mine never-- I mean literally never, I checked-- say anything but "close". Making me wonder what's the point of even having the header, if even the crudest robot just says the same thing. What do the page request headers say?
I need a new host, this one is driving me insane. Every single page has max-age=0 in the request ...
...the max-age=0 is still being appended to all requests but it is now being ignored, all pages/images return a proper 304 not modified response.
Not sure why you would need to explicitly unset the Expires headerIn the primary domain, if I set something via htaccess it is reiterated for all addon domains(completely different websites), that's not ideal. example: If I add a nosniff header on the primary domain and the addon domain it becomes nosniff,nosniff for the addon domain. If, god forbid I add a nosniff header entry on the primary domain and sniff entry on the addon domain(no reason to, just an example) it becomes 'nosniff,sniff' in the addon domain's results.
So, I assume the response/request headers now look a bit different to what you posted initially?Yes, the response/request headers now look a bit different to what I posted initially but only because they make no sense to the addon domain. When I realized that what the primary domain has in its htaccess file is more important than what is in the addon domain's htaccess file I worked it out. It's still wrong, and broken, but it works now.
In the primary domain, if I set something via htaccess it is reiterated for all addon domains(completely different websites), that's not ideal.
edit: my options include getting a new hosting plan for each individual site or moving a real website out of the primary domain spot and replacing it with a placeholder domain that doesn't require an htaccess file at all. No rules = no conflicts.Took the words right out of my mouth. Well, almost. You can continue using the "primary" htaccess for things that are shared by all sites, such as general access control. Definitely don't use mod_rewrite in this location. But things like <Files> envelopes to grant universal access to every site's robots.txt could certainly stay here.
What structure does the "userspace" structure take?