b2evolution CDN Integration

This tutorial shows how to complete a b2evolution CDN integration with KeyCDN.

  1. Create a pull zone before you start with the b2evolution CDN integration.
  2. Use your CDN URL e.g. http://yourzone-ab12.kxcdn.com for the next steps.
  3. One single file needs to be edited in order to set the path variables to point to the CDN location:  blogs/conf/_advanced.php
  4. Define a new variable at the beginning of the file:
    $cdnurl = ‘http://yourzone-ab12.kxcdn.com/’;
  5. Replacing the following variables in the code:
    Old New (Replace)
    $rsc_url = $baseurl.$rsc_subdir; $rsc_url = $cdnurl.$rsc_subdir;
    $skins_url = $baseurl.$skins_subdir; $skins_url = $cdnurl.$skins_subdir;
    $media_url = $baseurl.$media_subdir; $media_url = $cdnurl.$media_subdir;

That’s all. Check the HTML if all the URLs have been properly rewritten.

Leave A Comment?