Index syndication
comment syndication

Coral Content Distributed network

April 20, 2008 at 22:06 · Filed under Musings, tech, unix, webdev

Have you ever had your website hit on a topic that people find conflicting? When the site gets viewed by the masses, you need to be prepared. If you have access to modify your web server .htaccess file then go and have a read of the Coral CDN Overview
For those interested in the techie bits, here is my .htaccess for news site flood protection, and to allow CDN to serve up all my site images – thus offloading from my puny connection the bandwidth burden for images.


<ifmodule mod_rewrite.c>
RewriteEngine On
#prevent slashdot effect
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{HTTP_REFERER} blogspot\.com [NC,OR]
RewriteCond %{HTTP_REFERER} reddit\.com [NC,OR]
RewriteCond %{HTTP_REFERER} digg\.com [NC,OR]
RewriteCond %{HTTP_REFERER} news\.slashdot\.org [NC,OR]
RewriteCond %{HTTP_REFERER} slashdot\.org
RewriteRule ^(.*)$ https://techdebug.com.nyud.net/$1 [R,L]
#Rewrite images to allow CDN to serve them
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteRule ^(.*)/(.*\.(gif|png|jpe?g))$ https://techdebug.com.nyud.net/$1/$2 [R,L]
#Wordpress rewites
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</ifmodule>

mod_rewrite is your friend.

Leave a Comment