Support NATA 2014
Momo-the-Monkey
Momo-the-Monkey
  • Member since: Oct. 15, 2005
  • Offline.
Forum Stats
Member
Level 45
Musician
Subdomain image issue Apr. 23rd, 2013 @ 10:33 PM Reply

I have a site example1.com, with another site, example2.com, in a sub-directory of example1.com.
So example2.com points to example1.com/example2/.

The problem is that example2.com/img/ does not display any large images, but when I travel to example1.com/example2/img/ all the images display fine.

There's nothing in the .htaccess that would be blocking large images, and I don't have hotlink protection on. Any ideas what could be causing this?


Hello, from the past!
[ PHP: Main ]

BBS Signature
Momo-the-Monkey
Momo-the-Monkey
  • Member since: Oct. 15, 2005
  • Offline.
Forum Stats
Member
Level 45
Musician
Response to Subdomain image issue Apr. 23rd, 2013 @ 10:43 PM Reply

So apparently, they weren't being blocked, but cached.

I added ?1=1 to the end of the images that were not showing up, and they appeared. So that leads me to another question. Is there a better way than appending ?s=random-string to every single image to prevent new images under the same name from being shown as the old image?

Darn cache. Can't live with it, can't live without it.


Hello, from the past!
[ PHP: Main ]

BBS Signature
Secretmapper
Secretmapper
  • Member since: Nov. 25, 2010
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to Subdomain image issue Apr. 23rd, 2013 @ 11:01 PM Reply

At 4/23/13 10:43 PM, Momo-the-Monkey wrote: So apparently, they weren't being blocked, but cached.

I added ?1=1 to the end of the images that were not showing up, and they appeared. So that leads me to another question. Is there a better way than appending ?s=random-string to every single image to prevent new images under the same name from being shown as the old image?

Darn cache. Can't live with it, can't live without it.

There is a way! But Damn I can't remember it right now. But I just wanted to give you a ray of hope. Yes It's possible!

Secretmapper
Secretmapper
  • Member since: Nov. 25, 2010
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to Subdomain image issue Apr. 23rd, 2013 @ 11:06 PM Reply

Okay, I remember. You need to append this: "Expires", "Mon, 26 Jul 1997 05:00:00 GMT". That way, your content 'expired' in the past. Since it expired in the past, the browser will not cache it anymore.

And don't ask me about the date. Apparently it's when the world started. Except in Linux that is :lol:

At 4/23/13 11:01 PM, Secretmapper wrote:
At 4/23/13 10:43 PM, Momo-the-Monkey wrote: So apparently, they weren't being blocked, but cached.

I added ?1=1 to the end of the images that were not showing up, and they appeared. So that leads me to another question. Is there a better way than appending ?s=random-string to every single image to prevent new images under the same name from being shown as the old image?

Darn cache. Can't live with it, can't live without it.
There is a way! But Damn I can't remember it right now. But I just wanted to give you a ray of hope. Yes It's possible!