I'm using the wp super cache plugin with cdn support turned on (aws cloudfront). I'm also using wp tables reloaded. The latter plugin includes a text file via ajax, and that file is being served by the cdn. The plugin doesn't do any sort of jsonp maneuvers, so the file hits access-control-allow-origin issues.

Before I go and mess with the plugin to pull the file correctly, does anyone know how I can restrict the cdn from storing this file, and just serve it up directly?


The CDN tab of wp-supercache allows you to exclude files and folders.

[edited to add]

The field exclude if substring allows entry of a comma separated set of strings (eg .php, wp-include, specialpluginjsfilename). Any file names that match against this set of values is excluded from the CDN.

So, using the example above the following would be excluded from the CDN

  • All .php files
  • Any files or any file from any directory that has the string wp-include in it
  • Any file or any file from any directory that has the string specialpluginjsfilename in it.
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.