I have an image site of sorts and often get heavy traffic, not to the pages the images are on but to the images themselves. I’ve set up a script that has created copies of the original image with a small watermark that points them to my homepage.
The problem is displaying this alternate image only when the traffic is coming from an outside source. I have the htaccess code and as far as I can tell it’s all good, but when I set it loose, I get a 500 internal service error.
The 500 error only comes on when the referrer is not my site. They display correctly when I go to the image directly for example. Am I doing anything wrong? Could this be a server configuration?
D’oh! Can’t believe I missed that.
Thanks a bunch. I owe you my second-born (I promised my firstborn to someone else–I gotta stop using my future children as payment).
Sooooo that worked great on that site, but as a matter of experimentation, for another site with a similar structure, I want to redirect to the page with the image on it.
The problem is that right now the images have a space in their names and I don’t know how to deal with that.
The images are in mydomain.com/images/ and have the name structure “image (#).jpg” --the # represents a number; there are about 4000 images, all numbered. The page with the image is at mydomain.com/?i=# where # is the number that’s in the image name.
Assume the first 3 lines are the same. I tried the following, and get a 500 error:
Idk I saw it in some other place that if there’s a space you should use quotes around the whole thing. I shouldn’t trust everything I read on the internet, but yea I’ll take a look at that tutorial.
Okay, I’m glad that you got that resolved but may I recommend that you read the tutorial in my signature. I’m sure that I mentioned there that I use a str_replace(’ ‘,’_',$link) to replace spaces in the URI AND reverse that to reinstate the spaces for your db access. Example: http://wilderness-wally.com which uses (almost) ONLY titles of his articles for links. Easy-peasy!