Search:
Browse by category:



How can I use .htaccess to protect my bandwidth?:
Votes: 3
To prevent people from hotlinking files on your website, use the .htaccess file with the apache rewrite module. The module configuration is complex, but very powerful once you understand how it works. Here is an example .htaccess with mod_rewrite:

RewriteEngine on RewriteCond % !^.*mywebsite.com.*$ [NC]
RewriteRule ^.*$ http ://www.mywebsite.com/sorry.html [R]

You make this .htaccess file in the directory you wish to protect. It is effective for all subdirectories. You can change the rewrite URL (http ://www.mywebsite.com/sorry.html ) to what you want the user redirected to. You don't have to make a webpage, set it to whatever you would like.

Note: There must be a backslash '' before the '.' on the second line.
Example:
It should be: mywebsite.com.
Not: mywebsite.com


Other questions in this category:
What is hosting?
How do I transfer my sites to Webair.com hosting?
What is the difference between colocated and dedicated hosting?
What is virtual hosting?
Can I upgrade my hosting plan?
After I sign up for a hosting account, how long until I can upload files?
Can I host more then one website?
Can I make my own customized Unix 404 error page not found page?
What is IRC?
Can you Password Protect my Stats Page?
Does Webair tolerate spam?
Unix paths?

Tech support call center
1.866.WEBAIR1 (932.2471)