– to redirect any external direct calls to my pictures, text files, style sheets, or scripts to my home page.
With this rule, my own pages can access all those files, except for one – my favicon, which is here:
/res/favicon.jpg
My .css and .js files are in that same /res/ directory, and are called from the same headers that call the favicon, and they all work with this rewrite rule. Only the favicon is blocked.
Can someone spot the error and show me how to allow the favicon to be accessed by my own pages?
DK – I tried those lines of code, and still get the same result: all the jpg|txt|css|js files are blocked from direct call, and still show up as expected when called by my own pages – except the favicon, which my own pages can’t access using this code either. Mysterious. I’ve checked and double-checked – same result.
MarPlo – Using a gif for the favicon doesn’t solve the problem when I add gif to the filter (jpg|txt|css|js|gif), though it could conceivably be a kludge, since I have no other gifs in my whole site and thus could allow direct calls to gif (the number of hotlink calls to my favicon likely being, er, small).
Surprise! – It’s a browser problem. I should have thought of this sooner. I mainly use Mac/Firefox.3.6 and that’s where I get the problem. But Safari and iCab display the favicon as expected with either form of the filter (my original and DK’s variant). This obviously isn’t a huge problem but if anyone might suggest why this would happen I’d appreciate knowing, just for the sake of thoroughness. (I could try a new Firefox but prefer to stay for now with 3.6).