Forum Moderators: phranque
[edited by: phranque at 8:46 am (utc) on Jan 8, 2014]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} Wget [OR]
RewriteCond %{HTTP_USER_AGENT} CherryPickerSE [OR]
<snip, snip>
RewriteCond %{HTTP_USER_AGENT} ExtractorPro
RewriteRule ^.*$ deny.html [L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^ <standard hotlink list here>
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|mov|mp4)$ www.episodexistudios.com [R,NC]
List all the other non-RewriteRule code (Add.., Expires.., Auth.., Error...) after all of that.
[edited by: phranque at 11:05 pm (utc) on Jan 8, 2014]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]
RewriteBase /
ErrorDocument 500 http://www.example.com/index.html
ErrorDocument 500 /index.html <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
...
</IfModule>
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://example.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://example.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://example.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://example.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.com$ [NC]
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteEngine on
# Rule 1
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
# Rule 2
RewriteRule ^files/([^/]+)/([^/]+).zip /download.php?section=$1&file=$2 [NC]
# Rule 3
RewriteCond %{HTTP_USER_AGENT} Wget [OR]
RewriteCond %{HTTP_USER_AGENT} CherryPickerSE [OR]
RewriteCond %{HTTP_USER_AGENT} CherryPickerElite [OR]
RewriteCond %{HTTP_USER_AGENT} EmailCollector [OR]
RewriteCond %{HTTP_USER_AGENT} EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ExtractorPro
RewriteRule ^.*$ deny.html [L]
# Rule 4
RewriteRule ^index\.php$ - [L]
# Rule 5
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# Rule 6
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://example.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://example.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://example.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://example.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|mov|mp4)$ www.example.com [R,NC]