Htaccess: Preventing hot linking: Difference between revisions

Moved to new category; Additional grammar and cleanup edits.
(Punctuation and grammatical changes; some clarification.)
(Moved to new category; Additional grammar and cleanup edits.)
 
Line 2: Line 2:
<div style="padding:0;margin:0; border-bottom:3px inset #000000">
<div style="padding:0;margin:0; border-bottom:3px inset #000000">
{|  
{|  
|[[Image:uc_small_logo.gif | MPG UniCenter]] ||
 
.htaccess:  
.htaccess:  
[[Htaccess: Introduction | Introduction]] |   
[[Htaccess: Introduction | Introduction]] |   
Line 20: Line 20:
'''Hot linking'''
'''Hot linking'''


What is hot linking? It's when someone links to some content on your server and uses your server to deliver the goods. It could be images or any non-html objects. They are effectively stealing your bandwidth at your expense.
What is hot linking? It's when someone else links to some content on your server and uses your server to deliver the goods. It could be images or any non-html objects. They are effectively stealing your bandwidth at your expense.


Uniform Server has mod-rewrite enabled, allowing you to rewrite the requested URL on-the-fly based on configuration directives and rules. It's as complex as it sounds. I found this code on the Internet which prevents hot linking to images on your site.
The Uniform Server has mod-rewrite enabled, allowing you to rewrite the requested URL on-the-fly based on configuration directives and rules. It's as complex as it sounds. I found this code on the Internet which prevents hot linking to images on your site.


Just pop this code into your root .htaccess file for global effect, or a sub-folder to localise the effect to just one section of your site:
Just pop this code into your root .htaccess file for global effect, or a sub-directory to localise the effect to just one section of your site:


== Serve a broken image ==
== Serve a broken image ==
Line 74: Line 74:
----
----


[[Category: Support]]
[[Category: Apache Configuration]]
[[Category: Troubleshooting ]]
[[Category: Application]]
[[Category: Development]]