Web servers can only handle a specific amount of traffic. This is true for most of us web owners. Thankfully the limit is quite decent. People generally comprehend the whole idea and start looking for image downloads and needed bandwidth. What happens in case we have an image that most websites are willing to lap up?
Lets take up a poor case scenario- Lets assume you run a website that has procured a photograph taken by in a car accident belonging to an incident which acquires media bite. Now you seem to possess exclusive rights to the image. You obviously will be practical enough not to throw it away as a freebie. You would want to perhaps throw a downloadable version of it. This version can be bought by sites with an added incentive; you also get a link to your site. Another advantage is that your original photograph remains for you exclusively.
This brings us to the flop side. Few amateurs try presenting the best image download to a reader. Thus they do not download your free file or link to your site, they actually end up encrusting a link in their own page. This downloads your picture exclusively and makes it a part of their websites. This can now result in your being indexed by blogs on both sides. This way you will soon run out of your monthly bandwidth quota.
Even during the moderate scenario, there is a great chance that your site will be altered into a DNS. This will lead to loss of ranking and immediate viewer ship once you are away. Does it not tell us how that amazing photograph can actually harm?
There is another way out though; the .htaccess file. The files are dedicated to Apache servers. Many systems deny them access so it is better to check with the server compatibility prior to usage. Wrong .htaccessing might even lead to maligning certain servers. It is advisable to get in touch with the server administrator prior to the download.
.htaccess is a kind of file which has been utilized as a non-permeable membrane. It denies access to protected web pages and areas; for instance, the error pages and directories that are protected through passwords. .htaccess can be built through using text editors like NotePad or Simple Text. And then it can be saved as plain text. It is imperative to understand that file extension also needs to be altered from .txt to .htaccess. File name must be taken off. It should only be saved as .htaccess and not some world history .htaccess.
Sometimes the text programs are hell bent on appending the .txt format. In all such cases it is recommended to right click the file and choose rename to cast out the .txt. If the system is not adept at showing file extensions, you have got to teach them. In fact telnet and FTP can be a precious guide for renaming and removal of files.
It is easy to create an .htaccess file. Just open the text editor and save a vacant page as .htaccess Next you can put off the word wrap function. Word wrap can actually render the file unusable by not understanding the single line commands. It causes line breakage and even insertion of unwanted characters after upload.
Never encode an .htaccess file as a binary. The right tag is ASCII. The idea then is to let the server access the file but to make it unreachable for the browser. This can be done by CHMODing the file. It is important as readable .htaccess files can be easy prey for hackers who might easily run modified codes and find out the protected data. You can also place the authentication file above the root directory. This makes them inaccessible to www.
.htaccess file runs through the directory we place them in just placing the file in the root directory automatically protects files in any of the subsequent directories. In case you want to shelter the images, it is advisable to put it in the image directory. It is also advised to use minimum .htaccess files possible. Any amount of uselessness can create an infinite loop in the system,
How to prevent hot linking?
The most important thing you can do with your .htaccess file is to stop hot linking of non-HTML objects like images and movies. The process is also called Bandwidth stealing. The .htaccess file does not permit hot linking. The pilferers will aim for the images and end up getting some other broken meaningless image.
The .htaccess file reads as:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]
You must also talk to the server administrator in the event of your server delivering alternate current. You can add to the fourth line code in the .htaccess file to do this.
RewriteRule \.(gif|jpg)$ http://www.mydomain.com/logo.gif [R,L]
This would bring forth image (your logo) that you have in your directory. It is essential to remember to change domains to proper ones.








