Forum Moderators: phranque
Now the image subdomain (img.example.com) is serving images but when I open this url in browser it opens my main site (example.com) because both are pointed to same folder.
I am looking for a rewrite rule which can do a 301 redirect img.example.com to example.com but continue serving images from img.example.com/images
Help me!
Looking at a requested URL, how can you most easily tell it's a request for an image? Are all images stored in a particular directory structure (such as a subdirectory called "/images")? Or is checking for one of several "file types" like .gif, .jpg, .jpe, .jpeg, .png, etc. the only way to tell?
It is simple to fix this problem. It is not quite so simple to fix it in an efficient manner. And because you have considered image-loading performance as important enough to actually go implement a separate subdomain, it's obvious that your traffic levels are high and that an efficient solution is needed.
Jim
First you have to define 'images' in some way that can be understood by program code in your server.
... and once you've defined it, you can tell us the definition, and then we can help with this problem.
Generally, if contributors here post questions in response to your question(s), then the discussion cannot productively continue until those questions are answered.
Jim