Notes‎ > ‎

Apache

Custom 503 error page

See

ErrorDocument 503 /usr/home/stratics/public_html/503.html

RewriteEngine On

RewriteCond %{REMOTE_ADDR} !^111\.111\.111\.111$
RewriteCond %{REQUEST_URI} !\.(css|gif|ico|jpg|js|png|swf|txt|pdf)$
RewriteRule .* - [R=503,L]

Protecting your bandwidth

"Bandwidth stealing," also known as "hot linking," is linking directly to non-html objects on another server, such as images.

To disallow hot linking on your server

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?YourSite\.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]


Redirect all traffic to new domain

redirect 301 / http://www.newdomain.com/



Comments