├── .gitattributes ├── .gitignore ├── .gitlab-ci.yml ├── Dockerfile.testenv ├── README.rst ├── cdn-linker-base.php ├── cloudbuild.yaml ├── composer.json ├── uninstall.php └── wp-cdn-linker.php /.gitattributes: -------------------------------------------------------------------------------- 1 | .atoum.php export-ignore 2 | test/ export-ignore 3 | test.php export-ignore 4 | 5 | *.php text eol=lf diff=php 6 | *.rst text=auto 7 | composer.json text=auto 8 | test/samples/*.gz diff=gzip-html 9 | 10 | .gitattributes text=auto 11 | 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.komodoproject 2 | .komodotools 3 | mageekguy.atoum.phar 4 | README.pdf 5 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | get_dependencies: 2 | stage: build 3 | image: composer 4 | script: 5 | - composer install -n 6 | cache: 7 | key: "$CI_BUILD_STAGE" 8 | paths: 9 | - bin 10 | - vendor 11 | 12 | .unit_test: &howto_unit_test 13 | stage: test 14 | script: 15 | - bin/atoum -f test.php 16 | 17 | test:php_5: 18 | <<: *howto_unit_test 19 | image: 'php:5' 20 | 21 | test:php_7: 22 | <<: *howto_unit_test 23 | image: 'php:7' 24 | 25 | test:php_latest: 26 | <<: *howto_unit_test 27 | image: 'php' 28 | 29 | test:php_RC: 30 | <<: *howto_unit_test 31 | image: 'php:rc' 32 | allow_failure: true 33 | -------------------------------------------------------------------------------- /Dockerfile.testenv: -------------------------------------------------------------------------------- 1 | FROM mirror.gcr.io/library/php 2 | 3 | SHELL ["/bin/bash", "-c"] 4 | 5 | RUN if ! command -v unzip &>/dev/null; then \ 6 | apt-get -q update && \ 7 | apt-get -y install unzip; \ 8 | find /var -name '*-old' -type f -delete && \ 9 | apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \ 10 | fi 11 | 12 | RUN if ! command -v composer &>/dev/null; then \ 13 | curl -fsSLR -o /usr/bin/composer https://getcomposer.org/composer-stable.phar; \ 14 | chmod a+x /usr/bin/composer; \ 15 | fi 16 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ==================================== 2 | CDN Linker for Wordpress and Magento 3 | ==================================== 4 | .. image:: https://coveralls.io/repos/wmark/CDN-Linker/badge.svg?branch=master 5 | :target: https://coveralls.io/r/wmark/CDN-Linker?branch=master 6 | 7 | *Info* 8 | See `github `_ for the latest source. 9 | 10 | *Author* 11 | Mark Kubacki 12 | 13 | *License* 14 | RPL v1.5, for non-commercial Personal Use (§ 1.11) 15 | 16 | *Tags* 17 | CDN,links,cloudfront,simplecdn,media,performance,distribution,accelerator,content,speed,cloud 18 | 19 | *Requirements* 20 | Wordpress 2.7 – 5.5 and later, PHP ≥5.6 or HHVM ≥ .3.0 21 | 22 | Rewrites links to static files to your own CDN network. 23 | 24 | Description 25 | ============ 26 | Modifies links pointing to ‘wp-content’ and/or ‘wp-includes’ (or whatever you configure) 27 | by replacing your ‘blog_url’ with a custom one. 28 | Enables you to pull static files, such as images, CSS or JS, from a different host, mirror or CDN. 29 | 30 | You could upload your files to S3, CloudFront or a host dedicated to serving static files. 31 | 32 | License 33 | ======== 34 | Licensed under the Reciprocal Public License, Version 1.5, for Personal Use as defined in 1.11 therein 35 | (http://www.opensource.org/licenses/rpl1.5). 36 | 37 | Else, please contact me by email for an individual license. 38 | I will need the number of sites and servers you are running to make you an offer 39 | (which is a tip of 10 to 20 EUR in most cases). 40 | 41 | Installation 42 | ============= 43 | 44 | 1. Setup your CDN: Either configure “origin pull”, “mirror bucket” or upload your static files to a dedicated host. 45 | 2. Upload the plugin to your `/wp-content/plugins/` directory. 46 | 3. Activate the plugin through the ‘Plugins’ menu in WordPress. 47 | 4. Provide the URL, where your static files can be found, under ‘Settings’. 48 | 49 | Support 50 | ======== 51 | 52 | Before asking for support please upgrade to the latest non-beta version of CDN Linker! 53 | 54 | * I will happily discuss your feature requests and ideas for further development if you send me an email. 55 | * Please understand that individual support is not free of charge. 56 | Attach to your initial email a list of all installed plugins, and the two HTML files (just text, no images) 57 | you receive when running with and without CDN Linker being enabled. 58 | Please remember to mention the URL to your site as well as your license number or Paypal transaction ID, if you have it. 59 | * The cause of empty pages is, in all cases as of now, a different caching plugin which already does rewriting of links. 60 | 61 | .. _StackExchange: http://wordpress.stackexchange.com/questions/tagged/plugins 62 | .. _Github: https://github.com/wmark/CDN-Linker/issues 63 | 64 | Frequently Asked Questions 65 | =========================== 66 | 67 | Is it any good? 68 | Yes. 69 | 70 | Is it free of charge to use? 71 | Yes, for personal use. Not for commercial use or hosting companies. 72 | 73 | ‘Personal use’ excludes any commercial or commercialized sites or blogs. 74 | Although ‘personal use’ excludes hosting companies you are free to upload the plugin to your WP installation individually, though, 75 | as long as your “WP installation” is covered by the term ‘personal use’. ;-) 76 | 77 | You can obtain a generous license for other use-cases for a tip. 78 | By ‘generous’ I mean that one license will cover all domains serving the same content no matter which TLD 79 | (myblog.com, myblog.de, myblog.us — all covered) and the such. 80 | Contact me by email with a list of the relevant domain names. 81 | 82 | Contributors will receive a gratis license. 83 | 84 | How do I uninstall it? 85 | Go to Wordpress' plugin listing and click on “delete”. 86 | 87 | Will it work with my CDN? 88 | Yes, **if it supports “origin pull”** (aka “mirror bucket”, some sort of caching). Or if you upload your files manually. 89 | 90 | What about Amazon’s S3? 91 | Right, S3 doesn’t support “origin pull”. You will have to upload your files by hand. 92 | I’ve written a script for this, too, so it is just a matter of running it. It is linked on the bottom of my blog post about 93 | `copying files to S3 `_. 94 | 95 | Amazon’s CloudFront does support origin pull. Just create a “distribution” as usual and set your blog’s URL as “origin”. 96 | 97 | So, my blog is fully served by a CDN? 98 | No. Wordpress will still have to run on the original host. 99 | “www.myblog.blog” will still have to be “www.myblog.blog”, only your (for example) images will be loaded 100 | from “cdn.myblog.blog”. Most CDNs do not support fast-changing content or passthrough of HTTP POST requests (→ comments). 101 | 102 | There is more than one “CDN Linker”? 103 | Yes. This is the regular version. A “professional” version exists, too, and is available to paying customers. 104 | And there are forks for CDN providers. 105 | 106 | What other plugins do you recommend? 107 | Now that you can offload all the files such as images, music or CSS, you should serve your blog posts as static files to 108 | decrease load on your server. I recommend SuperCache-Plus_ as it will maintain, update and create that static files from 109 | dynamic content for you. The CDN Linker is compatible. 110 | 111 | .. _Mark: https://github.com/wmark/ 112 | .. _SuperCache-Plus: http://murmatrons.armadillo.homeip.net/features/experimental-eaccelerator-wp-super-cache 113 | 114 | Troubleshooting 115 | ================ 116 | 117 | Disqus 118 | Either uncheck `rewrite root-relative refs` or add `count.js` and `embed.js` to `exclude if substring`. 119 | 120 | HHVM 121 | For CDN Linker’s *post-processing* feature you will have to install `hhvm-zmq `_ 122 | (monitor issue `1214 `_) or resort to Redis. 123 | 124 | __ Mark_ 125 | -------------------------------------------------------------------------------- /cdn-linker-base.php: -------------------------------------------------------------------------------- 1 | cdn_url = $cdn_url; 30 | } 31 | 32 | public function for_source(&$url) { 33 | return $this->cdn_url; 34 | } 35 | 36 | } 37 | 38 | class Target_multiple_hosts implements Target_URL_Strategy 39 | { 40 | /** 41 | * String: URL with pattern %d% for the CDN domains. 42 | * 'd' is how many variations exist. 43 | */ 44 | var $cdn_pattern = null; 45 | /** Number of variations. Derived from the above variable. */ 46 | var $variations = 0; 47 | /** Fragment, to speed up replacings. */ 48 | protected $fragment = null; 49 | 50 | function __construct($cdn_pattern) { 51 | preg_match('/%(\d)%/', $cdn_pattern, $m); 52 | $this->variations = max($m[1], 1); 53 | $this->cdn_pattern = $cdn_pattern; 54 | $this->fragment = $m[0]; 55 | } 56 | 57 | public function for_source(&$url) { 58 | $n = ( hexdec(substr(md5($url), 0, 1)) % $this->variations ) + 1; 59 | return str_replace($this->fragment, $n, $this->cdn_pattern); 60 | } 61 | 62 | } 63 | 64 | /** 65 | * Gets an implementation of Target_URL_Strategy. 66 | */ 67 | function target_url_strategy_for($pattern) { 68 | if (preg_match('/%(\d)%/', $pattern)) { 69 | return new Target_multiple_hosts($pattern); 70 | } 71 | return new Target_single_host($pattern); 72 | } 73 | 74 | /** 75 | * Reperesents the CDN Linker's rewrite logic. 76 | * 77 | * 'rewrite' gets the raw HTML as input and returns the final result. 78 | * It finds all links and runs them through 'rewrite_singe', which prepends the CDN domain. 79 | * 80 | * 'URI_changer' contains no WP related function calls and can thus be used in testing or in other software. 81 | */ 82 | class URI_changer 83 | { 84 | /** String: the blog's URL ( get_option('siteurl') ) */ 85 | var $blog_url = null; 86 | /** Target_URL_Strategy: results in URL of a CDN domain */ 87 | var $get_target_url = null; 88 | /** String: directories to include in static file matching, comma-delimited list */ 89 | var $include_dirs = null; 90 | /** Array: strings which indicate that a given element should not be rewritten (i.e., ".php") */ 91 | var $excludes = array(); 92 | /** Boolean: if true, modifies root-relative links */ 93 | var $rootrelative = false; 94 | /** Boolean: if true, missing subdomain 'www' will still result in a match*/ 95 | var $www_is_optional = false; 96 | /** Boolean: HTTPS accesses deactivate rewriting */ 97 | var $https_deactivates_rewriting = true; 98 | /** Boolean: will skip some matches in JS scripts if set to true */ 99 | var $skip_on_trailing_semicolon = false; 100 | /** Boolean: only set in unit tests */ 101 | var $in_unit_test = false; 102 | 103 | 104 | /** Constructor. */ 105 | function __construct($blog_url, Target_URL_Strategy $get_target_url, $include_dirs, 106 | array $excludes, $root_relative, $www_is_optional, 107 | $https_deactivates_rewriting) { 108 | $this->blog_url = $blog_url; 109 | $this->get_target_url = $get_target_url; 110 | $this->include_dirs = $include_dirs; 111 | $this->excludes = $excludes; 112 | $this->rootrelative = $root_relative; 113 | $this->www_is_optional = $www_is_optional; 114 | $this->https_deactivates_rewriting = $https_deactivates_rewriting; 115 | } 116 | 117 | /** 118 | * Determines whether to exclude a match. 119 | * 120 | * @param String $match URI to examine 121 | * @return Boolean true if to exclude given match from rewriting 122 | */ 123 | protected function exclude_single(&$match) { 124 | foreach ($this->excludes as $badword) { 125 | if (!!$badword && stristr($match, $badword) != false) { 126 | return true; 127 | } 128 | } 129 | return false; 130 | } 131 | 132 | /** 133 | * Rewriter of URLs, used as callback for rewriting in {@link ossdl_off_filter}. 134 | * 135 | * @param String $match An URI as candidate for rewriting 136 | * @return String the unmodified URI if it is not to be rewritten, otherwise a modified one pointing to CDN 137 | */ 138 | protected function rewrite_single($match) { 139 | if ($this->exclude_single($match[0])) { 140 | return $match[0]; 141 | } 142 | 143 | $blog_url = $this->blog_url; 144 | if ($this->www_is_optional && $match[0][0] != '/' && !strstr($match[0], '//www.')) { 145 | $blog_url = str_replace('//www.', '//', $blog_url); 146 | } 147 | if (!$this->rootrelative || strstr($match[0], $blog_url)) { 148 | return str_replace($blog_url, $this->get_target_url->for_source($match[0]), $match[0]); 149 | } 150 | // obviously $this->rootrelative is true and we got a root-relative link - else that case won't happen 151 | return $this->get_target_url->for_source($match[0]) . $match[0]; 152 | } 153 | 154 | /** 155 | * Creates a regexp-compatible pattern from the list of relevant directories. 156 | * 157 | * @return String regexp pattern for those directories, or empty if none are given 158 | */ 159 | protected function include_dirs_to_pattern() { 160 | $input = explode(',', $this->include_dirs); 161 | if ($this->include_dirs == '' || count($input) < 1) { 162 | return 'wp\-content|wp\-includes'; 163 | } 164 | return implode('|', array_map('quotemeta', array_map('trim', $input))); 165 | } 166 | 167 | /** 168 | * Takes care of an optional 'www' subdomain and an optional domain name. 169 | * 170 | * @return String regexp pattern such as {@code '(?:http://(?:www\.)?example\.com)?'} 171 | */ 172 | protected function blog_url_to_pattern() { 173 | $blog_url = quotemeta($this->blog_url); 174 | $max_occurences = 1; // due to PHP's stupidity this must be a variable 175 | if ($this->www_is_optional && strstr($blog_url, '//www\.')) { 176 | $blog_url = str_replace('//www\.', '//(?:www\.)?', $blog_url, $max_occurences); 177 | } 178 | if ($this->rootrelative) { 179 | return '(?:'.$blog_url.')?'; 180 | } 181 | return $blog_url; 182 | } 183 | 184 | /** 185 | * Output filter which runs the actual plugin logic. 186 | * 187 | * Gets the page's HTML and runs {@link rewrite_single} on every found substring. 188 | * 189 | * @param String $content the raw HTML of the page from Wordpress, meant to be returned to the requester but intercepted here 190 | * @return String modified HTML with replaced links - will be served by the HTTP server to the requester 191 | */ 192 | public function rewrite(&$content) { 193 | if ($this->https_deactivates_rewriting && isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { 194 | return $content; 195 | } 196 | 197 | $dirs = $this->include_dirs_to_pattern(); 198 | // string has to start with a quotation mark or parentheses 199 | $regex = '#(?<=[(\"\'])'; 200 | // ... optionally followed by the blog url 201 | $regex .= $this->blog_url_to_pattern(); 202 | // ... after that by a single dash, 203 | // (followed by a directory and some chars 204 | // or a filename (which we spot by the dot in its filename)) 205 | $regex .= '/(?:((?:'.$dirs.')[^\"\')]+)|([^/\"\']+\.[^/\"\')]+))'; 206 | // ... finally ending in an enclosing quotation mark or parentheses 207 | if ($this->skip_on_trailing_semicolon) { 208 | $regex .= '(?=[\"\'][^;]|\))#'; 209 | } else { 210 | $regex .= '(?=[\"\')])#'; 211 | } 212 | 213 | $new_content = preg_replace_callback($regex, array(&$this, 'rewrite_single'), $content); 214 | return $new_content; 215 | } 216 | 217 | } 218 | 219 | /** 220 | * This is called by Wordpress. 221 | */ 222 | function register_as_output_buffer_handler() { 223 | if (get_option('siteurl') == trim(get_option('ossdl_off_cdn_url'))) { 224 | return; 225 | } 226 | 227 | $excludes = array_map('trim', explode(',', get_option('ossdl_off_exclude'))); 228 | $rewriter = new URI_changer( 229 | get_option('siteurl'), 230 | target_url_strategy_for(trim(get_option('ossdl_off_cdn_url'))), 231 | trim(get_option('ossdl_off_include_dirs')), 232 | $excludes, 233 | !!trim(get_option('ossdl_off_rootrelative')), 234 | !!trim(get_option('ossdl_off_www_is_optional')), 235 | !!trim(get_option('ossdl_off_disable_cdnuris_if_https')) 236 | ); 237 | 238 | ob_start(array(&$rewriter, 'rewrite')); 239 | } 240 | -------------------------------------------------------------------------------- /cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | tags: ['php', 'composer', 'atoum'] 2 | timeout: 180s 3 | 4 | steps: 5 | - name: 'gcr.io/cloud-builders/docker' 6 | id: 'build unit test environment' 7 | args: ['build', '--file=Dockerfile.testenv', '--tag=localhost/php/composer', '.'] 8 | 9 | - name: 'localhost/php/composer' 10 | id: 'get dependencies' 11 | args: ['composer', 'install', '-n'] 12 | 13 | - name: 'mirror.gcr.io/library/php' 14 | id: 'unit tests' 15 | args: ['bin/atoum', '-f', 'test.php'] 16 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wmark/cdn-linker", 3 | "type": "wordpress-plugin", 4 | "keywords": [ 5 | "wordpress", 6 | "plugin", 7 | "roots" 8 | ], 9 | "config": { 10 | "bin-dir": "bin/" 11 | }, 12 | "require": { 13 | "php": ">=5.5" 14 | }, 15 | "require-dev": { 16 | "atoum/atoum": ">=2.1" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /uninstall.php: -------------------------------------------------------------------------------- 1 | wp-content and/or wp-includes (or whatever you configure) by replacing your ‘blog_url’ with a custom one. Enables you to pull static files, such as images, CSS or JS, from a different host, mirror or CDN. 6 | Version: 1.4.2 7 | Author: Mark Kubacki 8 | Author URI: https://github.com/wmark/ 9 | License: RPL 1.5, for Personal Use 10 | */ 11 | 12 | namespace blitznote\wp; 13 | 14 | if ( @include_once('cdn-linker-base.php') ) { 15 | add_action('template_redirect', 'blitznote\wp\cdn\register_as_output_buffer_handler'); 16 | } 17 | 18 | /********** WordPress Administrative ********/ 19 | 20 | function on_plugin_activation() { 21 | add_option('ossdl_off_cdn_url', get_option('siteurl')); 22 | add_option('ossdl_off_include_dirs', 'wp-content,wp-includes'); 23 | add_option('ossdl_off_exclude', '.php'); 24 | add_option('ossdl_off_rootrelative', ''); 25 | add_option('ossdl_off_www_is_optional', ''); 26 | add_option('ossdl_off_disable_cdnuris_if_https', '1'); 27 | } 28 | register_activation_hook( __FILE__, 'blitznote\wp\on_plugin_activation'); 29 | 30 | /********** WordPress Interface ********/ 31 | add_action('admin_menu', 'blitznote\wp\add_to_admin_sidebar_menu'); 32 | add_filter('plugin_action_links', 'blitznote\wp\add_to_plugin_actions', 10, 2); 33 | 34 | function add_to_admin_sidebar_menu() { 35 | add_options_page('CDN Linker', 'CDN Linker', 'manage_options', __FILE__, 'blitznote\wp\on_handle_admin_page'); 36 | } 37 | 38 | function add_to_plugin_actions($links, $file) { 39 | static $this_plugin; 40 | if (!$this_plugin) { 41 | $this_plugin = plugin_basename(__FILE__); 42 | } 43 | 44 | if ($file == $this_plugin && is_plugin_active($file)) { 45 | $settings_link = '' . __('Settings') . ''; 46 | array_unshift($links, $settings_link); // before other links 47 | } 48 | return $links; 49 | } 50 | 51 | function on_handle_admin_page() { 52 | if (!empty($_POST) && check_admin_referer('save-options', 'ossdl-nonce')) { 53 | // Yes, this URL is not subject to esc_url() or esc_url_raw() (please don’t report it), because: 54 | // 1) Only the owner of the installation can change this setting — if he/she wants something odd here (javascript:…; HTML fragments), we allow for it! 55 | update_option('ossdl_off_cdn_url', $_POST['ossdl_off_cdn_url']); 56 | update_option('ossdl_off_include_dirs', $_POST['ossdl_off_include_dirs'] == '' ? 'wp-content,wp-includes' : $_POST['ossdl_off_include_dirs']); 57 | if(strstr($_POST['ossdl_off_exclude'], '.php')) { 58 | update_option('ossdl_off_exclude', $_POST['ossdl_off_exclude']); 59 | } else { 60 | // this forces '.php' being part of the list 61 | $excludes = array_map('trim', explode(',', $_POST['ossdl_off_exclude'])); 62 | $excludes[] = '.php'; 63 | update_option('ossdl_off_exclude', implode(',', $excludes)); 64 | } 65 | // checkboxes which are not checked are sometimes not sent, hence the additional calls to isset($_POST(…)) 66 | $ossdl_off_rootrelative = isset($_POST['ossdl_off_rootrelative']) ? !!$_POST['ossdl_off_rootrelative'] : false; 67 | $ossdl_off_www_is_optional = isset($_POST['ossdl_off_www_is_optional']) ? !!$_POST['ossdl_off_www_is_optional'] : false; 68 | $ossdl_off_disable_cdnuris_if_https = isset($_POST['ossdl_off_disable_cdnuris_if_https']) ? !!$_POST['ossdl_off_disable_cdnuris_if_https'] : false; 69 | update_option('ossdl_off_rootrelative', $ossdl_off_rootrelative); 70 | update_option('ossdl_off_www_is_optional', $ossdl_off_www_is_optional); 71 | update_option('ossdl_off_disable_cdnuris_if_https', $ossdl_off_disable_cdnuris_if_https); 72 | } 73 | 74 | $example_file_rr = '/wp-includes/images/rss.png'; 75 | if (get_option('ossdl_off_cdn_url') == get_option('siteurl')) { 76 | $example_cdn_uri = str_replace('http://', 'http://cdn.', str_replace('www.', '', get_option('siteurl'))) 77 | . $example_file_rr; 78 | } else { 79 | $example_uri = get_option('siteurl') . $example_file_rr; 80 | $get_target_url = cdn\target_url_strategy_for(trim(get_option('ossdl_off_cdn_url'))); 81 | $example_cdn_uri = $get_target_url->for_source($example_uri) . $example_file_rr; 82 | } 83 | 84 | ?>
85 |

CDN Linker

86 |

Many Wordpress plugins misbehave when linking to their JS or CSS files by not calling the appropriate functions from Wordpress. 87 | This results in you not being able to pull static files, such as images, CSS or JS, from a different host, mirror or CDN.

88 |

Therefore this plugin modifies links pointing to wp-content and/or wp-includes by replacing your blog_url with the URL you provide below. 89 | You will be able to lessen the load on machines running your WP installation, 90 | and utilize CDNs providing origin pull or hosts dedicated to serving static files.

91 |

WARNING: Test some static urls e. g., to ensure your CDN service is fully working before saving changes.

92 |
93 | 94 | 95 | 96 | 100 | 101 | 102 | 103 | 113 | 114 | 115 | 116 | 120 | 121 | 122 | 123 | 128 | 129 | 130 | 131 | 136 | 137 | 138 | 139 | 144 | 145 | 146 | 147 | 153 | 154 |
97 | 98 | Yes, I have understood that I need to license this copy of CDN Linker if this site is either commercial or not for personal use. 99 |
104 | 105 | The new URL to be used in place of for rewriting. No trailing / please. E. g. . 106 | — 107 | You can use %4% (a number between 1 and 9, surrounded by percent signs) to use that many hostname variations. 108 | Should be between 2 and 4, with 4 being beyond an universal optimum. 109 | If you are going to use 3 or more then make sure they have different IPs or 110 | some routers will block requests to them. 111 | 112 |
117 | value="true" /> 118 | Check this if you want to have links like /wp-content/xyz.png rewritten - i. e. without your blog’s domain as prefix. 119 |
124 | value="true" /> 125 | Check this if your blog can be accessed without a www in front of its domain name. If unchecked links without a www won’t be modified. 126 | Safe to say yes here. 127 |
132 | value="true" /> 133 | Skips linking to your CDN if the page has been visited using HTTPS. This option will not affect caching. 134 | If in doubt say yes. Say no if your CDN supports HTTPS. 135 |
140 | 141 | Directories to include in static file matching. 142 | Use a comma as delimiter. Default is wp-content, wp-includes, which will be enforced if this field is left empty. 143 |
148 | 149 | Excludes something from being rewritten if one of the above strings is found in the match. 150 | Use a comma as delimiter. E. g. .php, .flv, .do. 151 | Always include .php, which is the default. (Will be set to .php if left empty.) 152 |
155 | 156 |

157 |
158 |