arethinn: glowing green spiral (tech (agent geek squad))
I am just tearing my hair out over trying to host the pictures for my custom mood themes on my own website rather than in LJ ScrapBook, which is where they currently are. (I'm considering letting my paid account lapse, so ScrapBook would go with that. Technically you don't get custom mood themes with a basic account, but if you have one already in place, it's supposed to stick, although you can't make further changes to it.) If I turn off hotlinking protection, everything is hunky-dory, but I want that on. And I can't seem to enter anything in the allowed referers list that actually works and lets the images appear. It won't take input like .insanejournal.com; it apparently has to be a full URL beginning with http://, and besides that, http://www.insanejournal.com doesn't make it work anyway. I can only assume that the actual http request is coming from some other server name, but I can't figure out what. (I happened to be testing on IJ because I want it to work there too, but my recollection is of having similar problems on LJ the last time I tried this with hotlink protection. I assume the same will be the case on Dreamwidth.) edit 2: No, in fact, the case is that the referer changes to match the account name of the person reading their flist. (I could add my own journal name to the list but it would only work if someone viewed the journal directly.) With wildcard entries simply getting erased if I try to add them to the whitelist, I can't see how it's feasible to add all possible referers. Argh.

I really don't want to do something like start a Photobucket account just for this. There should be a way to make this work but I am just at my wits' end.

edit 1: Really, I suppose I could learn to live without the mood themes; most of the time I forget to set a mood on posts anyway. But I need a place to stick pictures when I just want to display them in my journal, which is the other main thing I use ScrapBook for. I suppose if it came to it I could stick them in my deviantArt scraps or flickr or something, but it doesn't seem like the "right" solution somehow.

Date: Mar. 9th, 2010 09:47 pm (UTC)From: [identity profile] digitalsidhe.livejournal.com
There's no way I can enter all the possible referers for this kind of thing.

Depends. Your hotlink blocker may have a wildcard feature. If so, *.insanejournal.com/* ought to work (assuming the configuration syntax uses asterisks, of course; let me know if you need a regex or something).

Date: Mar. 9th, 2010 10:09 pm (UTC)From: [identity profile] digitalsidhe.livejournal.com
I've tried things with asterisks and also .insanejournal.com (with nothing leading) and they just vanish. .... (Experience with my usual attempts at wildcards being defeated was how I arrived at "and it's not feasible to enter all possible referers [manually].")

Oh. Well, crappity. :(

Ummmm... send a tech support request to your web hosting provider? I'll happily supply a regex, if you want, but I have trouble imagining that it would work. It sounds like they're sanitizing the data as you provide it, and would just strip out or reject it somehow.

(And kudos to them on the sanitizing; it may be annoying to us at the moment, but at least they're handling data properly instead of just taking any old thing and attempting to interpret it in some weird manner later.)

Date: Mar. 9th, 2010 10:46 pm (UTC)From: [identity profile] digitalsidhe.livejournal.com
My thought on that score was that they might either be able to say, "Oh, yes, we know about this problem. The solution is X", or "Oh, yes, we know about this problem, and we know that there is no solution." Either way, the situation gets resolved.

Date: Mar. 10th, 2010 12:45 am (UTC)From: [identity profile] digitalsidhe.livejournal.com
Possible. Theoretically possible. Can you read that .htaccess file? Can you write changes to it?

If you can do both of those things, can you send me a copy?

You can harmlessly test to see if you can write changes to it by adding a comment line, such as:

# This is a comment

Apache reads any line beginning with # as a comment.

If that works out, we might be able to make this work. Might.

Date: Mar. 10th, 2010 01:23 am (UTC)From: [identity profile] digitalsidhe.livejournal.com
Okay, we can make this work. Definitely. This is standard Apache mod_rewrite stuff.

I'll need to actually look up the reference on it when I have a chance. I don't use this kind of thing so often that I can just whip out a fix right here at work. Is your LJ account going to expire super-soon, or have I got a couple of days?

As for putting something lower down, you could put a .htaccess file in the directory you wanted to un-protect and have it say something like "RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - just go ahead and hand them the image" to override the higher-up one. But you'd need an explicit rule, not just a blank file. I could look up the code for that, but I suspect you actually want it to only allow access from IJ (in addition to eristic.net).

Date: Mar. 15th, 2010 03:58 pm (UTC)From: [identity profile] digitalsidhe.livejournal.com
Gah, sorry about not getting back to you on this sooner.

Did you copy the .htaccess file to the image directory, then add the new line(s) to what was already there? Or did you just make a new .htaccess file with just those new lines, and nothing else?

The former should work. The latter should not. But if you've tested it and found it to work, then that's good.

As far as keeping anyone else from making their own mood theme using it... I can't see a way to do that. Allowing hotlinking does allow hotlinking, so...

But I suspect the risk is low (and if someone tried it, you could always swap out the images for something that makes them look like horrible hotlinkers).

Date: Mar. 15th, 2010 06:27 pm (UTC)From: [identity profile] digitalsidhe.livejournal.com
But you'd know you were making the switch, and so you could update your moodtheme to use the new URLs.

Sorry, I just realized I left out a step! Example:

Suppose you have some icon at eristic.net/ljstuff/icon.png, and someone starts hotlinking to it. You could move that thing to .../new-icon.jpg, and replace it with a nasty image, and update your moodtheme to reference the new one.

A lot of work, true.

Date: Mar. 15th, 2010 07:08 pm (UTC)From: [identity profile] digitalsidhe.livejournal.com
Oops! Right, sorry about forgetting that. *headsmack*

Profile

arethinn: glowing green spiral (Default)
Arethinn

July 2025

S M T W T F S
  12345
6789101112
13141516171819
20 2122232425 26
2728293031  

Expand Cut Tags

No cut tags

Style Credit

Page generated Jan. 21st, 2026 05:00 pm
Powered by Dreamwidth Studios