Skip to content

Commit

Permalink
added support for sites hosted in sub-directories
Browse files Browse the repository at this point in the history
  • Loading branch information
zoul0813 committed Jul 29, 2013
1 parent 87ab932 commit fb0acdf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion w3tc-load-balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ function get_attached_file($file, $attachment_id) {
}

function get_base_url() {
return 'http://' . $this->w3tc_options['cdn.s3.bucket'] . '.s3.amazonaws.com/wp-content/uploads';

$site_url = parse_url(get_bloginfo('url'));
$this->debug("get_base_url -> " . print_r($site_url, true));
return 'http://' . $this->w3tc_options['cdn.s3.bucket'] . '.s3.amazonaws.com' . $site_url['path'] . '/wp-content/uploads';
}

function upload_dir($data) {
Expand Down

0 comments on commit fb0acdf

Please sign in to comment.