these are my mod_rewrite rules

Posted by Trogdor at 7:46am Aug 9 '09
You must sign in to send Trogdor a message

#Coralise
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$
RewriteRule ^/(.*)$ http://4cache.lankyland.com.nyud.net:8080/$1 [R,L]

Line 1 says, if this request is coming from a Coral Caching server do not redirect.

Line 2 says, if the Coral CDN has redirected back to the origin server do not redirect

Line 3 says, redirect everything else to its Coralized URI

Line 1 is very important, without it we get an infinite loop as Coral would not be able to grab and cache the original file.
Line 2 is important as sometimes if you use too much Coral Bandwidth the Coral servers can bounce back to the original source. It just ads ?coral-no-serve to the end of the URL.
Line 3 just rewrites all addresses to use the Coralized URL. Example: http://4cache.lankyland.com/index.php is actually http://4cache.lankyland.com.nyud.net:8080/index.php

If you don't want to use the mod_rewrite service and you have a smaller site you can use it just for larger files.

Below are the public posts you may view:

You currently have read-only access to this board. You must request an account to join the conversation.

Why Join 4thKingdom?

Note that there are no ads here. Just intelligent and friendly conversation. We keep the spam out, the trolls out, the advertisers out… 4K is just a low-key, old-fashioned site with members from around the world.
This community began in 1998, and we continue to accept new members today.

Hot Discussion Topics: