Joseph Witchard
04-01-2010, 08:27 AM
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://altlab.com/hotlink.gif [L]
1) What is the '%' before each referer used for?
2) What is the '!' at the beginning of the regular expression used for?
3) On line 3, I read that it "allows empty referrals". What does that mean?
4) What does '[L]' at the end of the replacement image URL do?
I know that I just have to follow tutorials on this by copying and pasting the code, but it bugs me if I don't understand why some things are done the way they are done. Thanks!
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://altlab.com/hotlink.gif [L]
1) What is the '%' before each referer used for?
2) What is the '!' at the beginning of the regular expression used for?
3) On line 3, I read that it "allows empty referrals". What does that mean?
4) What does '[L]' at the end of the replacement image URL do?
I know that I just have to follow tutorials on this by copying and pasting the code, but it bugs me if I don't understand why some things are done the way they are done. Thanks!