Using curl to view the HTTP headers of a file

Using curl to view the HTTP headers of a file

We’ve started using Cloudflare on a big eCommerce site that I’ve been helping to upgrade the infrastructure for. Using curl (on OSX, Linux, etc.) is a really handy way to quickly view the http headers of a file such as an image to see if it’s been cached on a CDN, etc. For example… curl https://www.ichi.co.uk/content/images/2016/10/ichilogo2-trans.png -vso /dev/null Gives the result (notice the CF-Cache-Status: HIT)… * Trying 104.27.160.139... * Connected to www.ichi.co.uk (104.27.160…

Read More

Fixing Tumblr Connection Reset Problems With Cloudflare

Since I’ve moved this site to Tumblr, Chrome has been giving me ERR_CONNECTION_RESET errors when trying to access it, forcing me to refresh a few times to get it to load. IE and Firefox were also telling me ‘The Connection Was Reset’. I also noticed a query-string being added to the URL, but I didn’t get to the bottom of that. I’ve just moved the DNS for this domain to Cloudflare.com and am using their CDN to cache and deliver the images and scripts on the site. Not only has the connection reset…

Read More

Redirecting www.* subdomain to the root domain in IIS 7

Having your site available on www.yourdomain.com and yourdomain.com isn’t good for your SEO as it splits the domain authority. You can use the Google Webmaster Tools to specify which domain Google should use, but you should also redirect on the site itself. You can do this in your web.config directly, but IIS has a module to do it for you. Redirecting from a sub-domain in IIS 7 is really easy using the URL Rewrite feature. First select the URL Rewrite module for your domain: Click Add Rul…

Read More