I keep subfolders in my webspace that contain files I share privately with friends/acquaintences; that is, there are no navigation links on my webpages that lead to those folders. I send the URLs via email when I want to allow others to view the contents. Obviously, it's more convenient to provided a single URL that generates an indexed sub-directory than to provide individual URLs for each and every file in a given directory. After Sonic recently disabled default directory indexing, I contacted tech support who kindly provided me with the needed .htaccess code to restore indexing in the subfolders I want to share. I implemented the very straightforward code and all is well with that issue.
During the process, I looked into other functionality controlled by .htaccess files at the Apache site and also at http://www.javascriptkit.com/howto/htaccess.shtml. I am interested in preventing hot linking of my images, which may be occurring more than I realize. In fact, some of my art images have actually been plagiarized from my website for print reproduction purposes in foreign countries – and this despite the fact that my online images are low-resolution by publishing standards. I know I can't prevent copying imagery from my site, but the hotlinking issue is bandwidth theft. Maybe I can do something about that.
I note that the author of the article on preventing hotlinking maintains that in order for it to work, mod rewrite needs to be enabled on the server. I experimented with two versions of anti-hotlinking .htaccess files. One version caused broken images when simply viewing my site via proper access (such as loading the home page from a link). The other version is in my finearts (Sonic username) directory now. The site looks and behaves normally, but I don't know how to test to see if hot-linking is foiled or not. So... three questions:
1. Is mod rewrite enabled on Sonic's servers? 2. How can I tell if hotlinking has been prevented by the .htaccess file lodged in my finearts directory? 3. Do I need to create a similar .htaccess file (or add to the current one) for the "sonic.net" domain? The anti-hotlinking .htaccess file reads as follows...
Thanks in advance to anyone who can offer advice on this.
Keith
keith@keithhalonen.com
http://www.keithhalonen.com
During the process, I looked into other functionality controlled by .htaccess files at the Apache site and also at http://www.javascriptkit.com/howto/htaccess.shtml. I am interested in preventing hot linking of my images, which may be occurring more than I realize. In fact, some of my art images have actually been plagiarized from my website for print reproduction purposes in foreign countries – and this despite the fact that my online images are low-resolution by publishing standards. I know I can't prevent copying imagery from my site, but the hotlinking issue is bandwidth theft. Maybe I can do something about that.
I note that the author of the article on preventing hotlinking maintains that in order for it to work, mod rewrite needs to be enabled on the server. I experimented with two versions of anti-hotlinking .htaccess files. One version caused broken images when simply viewing my site via proper access (such as loading the home page from a link). The other version is in my finearts (Sonic username) directory now. The site looks and behaves normally, but I don't know how to test to see if hot-linking is foiled or not. So... three questions:
1. Is mod rewrite enabled on Sonic's servers? 2. How can I tell if hotlinking has been prevented by the .htaccess file lodged in my finearts directory? 3. Do I need to create a similar .htaccess file (or add to the current one) for the "sonic.net" domain? The anti-hotlinking .htaccess file reads as follows...
Code: Select all
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?keithhalonen.com/.*$ [NC]
RewriteRule \.(gif|jpg|js|css)$ - [F]
Keith
keith@keithhalonen.com
http://www.keithhalonen.com