I've got a Drupal 7 site on Apache and Varnish, sitting behind the CloudFlare CDN. Everythin on mysite.com goes through cloudflare... I also have a "direct access" subdomain set up at direct.mysite.com, which is a CNAME alias that bypasses cloudflare.
One issue with Cloudflare is that it limits the upload size of files passing through its servers to 100MB. I want my users to be able to upload files that are larger than that.
What I would like to do is allow my users to add content like normal via mysite.com/add/node/type... but pipe the actual file uploads through to my direct subdomain (direct.mysite.com), so that the upload process itself (and only the upload process) bypasses CloudFlare, allowing files larger than 100 MB to be uploaded.
Any idea of how I would go about something like that?
I've tried a simple htaccess rewrite without any luck (the upload button seems to send the ajax request to the right place, but I get an "ajax http request terminated abnormally" error).
RewriteCond %{REQUEST_URI} ^/file/ [NC]
RewriteRule !^index\.php$ http://direct.mysite.com%{REQUEST_URI} [L,R]