oiran: cherry blossom (Default)
oiran ([personal profile] oiran) wrote2004-07-01 02:57 pm

hotlinking / htaccess question

I do websites for my friends because I can use FTP and I like to play with Dreamweaver.  This does not make me a "real" webmistress by any means.  Unfortunately, someone (or several someones) from that Russian bulletin board are hotlinking to a ton of images from Dana's webspace.  Can someone please tell me wtf htaccess is, and how one might use it?  I know nothing about server-side stuff, though I do know that everyone I help is on Apache servers (as am I).

Also, there seems to be some indication that htaccess would then make it impossible for people to use the LJ graphics stored on their webspace, though I'm not sure why... If that is the case, though, then it won't work for us, and I'll just have to rename all the files.  Feh.  But that  I know how to do.

If there are some online resources about htaccess (and other Apache commands) that someone could point me to, I'd really appreciate it. 

And now I'm going to go get vehicle emissions testing done and stand in lines. 

[identity profile] lexcorp-hope.livejournal.com 2004-07-01 01:10 pm (UTC)(link)
This (http://www.javascriptkit.com/howto/htaccess.shtml) is a really good tutorial and walks you through it step by step. I'm sorry these jerkheads are making this necessary. What is wrong with people, huh!?

[identity profile] clari-clyde.livejournal.com 2004-07-01 03:03 pm (UTC)(link)
I love htaccess. Like the link says, it’s a plain-text file called .htaccess and if your site host is unix or linux based, htaccess should work. I use it for the hotlinking prevention, custom error pages, preventing directory listing.

And what the article doesn’t say is that the htaccess file works for the file it’s in plus the folders within — so all you need is one htaccess file at the root of your site. But if you want, you can also use multiple htaccess files. Say you want one folder (and its folders) to have one scheme of error pages and another folder to have scheme b of error pages — just put an htaccess into each folder. So nifty that way.

[identity profile] stone-princess.livejournal.com 2004-07-01 01:19 pm (UTC)(link)
If the host has something like cPanel available, there are often setting there's where you can set up the folders to only have hotlinking access from certain sites like LJ. And cPanel is a GUI and all pinty and clicky, which is nice.
ext_2524: do what you like (Default)

[identity profile] slodwick.livejournal.com 2004-07-01 01:24 pm (UTC)(link)
I tried using cPanel for my site, but I couldn't get figure out the right address to use to still allow LiveJournal to access my pics.

[identity profile] stone-princess.livejournal.com 2004-07-06 02:38 pm (UTC)(link)
Hmm, I used http://www.livejournal.com and http://stone_princess.livejournal.com. It seems to work ok, but I don't know how well the protection part is working.

[identity profile] twigged.livejournal.com 2004-07-01 01:29 pm (UTC)(link)
Yeah, my site is with Host Cabin (in fact, I think I chose them based on a rec you made?) and it does have cPanel. I wondered whether the anti-hotlinking could be applied to a single sub-directory, or if it had to be applied to the entire site.

Anyway, jed, if you're asking this because you want the knowledge, then hoorah! but I don't really care one way or the other. And you are a real webmistress in mine eyes. You wear the "mistress" part really well. *snogs*

[identity profile] stone-princess.livejournal.com 2004-07-01 01:32 pm (UTC)(link)
I set Cpanel to only allow hotlinking to LJ and no where else onmy HostCabin account. I assume it's working so far...

[identity profile] twigged.livejournal.com 2004-07-01 01:33 pm (UTC)(link)
Well, that would definitely solve the problem, as I don't post images anywhere but on LJ. Yay!

[identity profile] clari-clyde.livejournal.com 2004-07-01 03:06 pm (UTC)(link)
htaccess works by trickle down — put one at the root of your site and its effects will trickle down to the subdirectories until it encounters another htaccess that overrides it.