WP-Mix

A fresh mix of code snippets and tutorials

Category Archive: HTTP

Posts about HTTP, SSL, et al

Page 1 of 2

Apache Require HTTP 1.1 for POST Requests

A reader recently asked how to limit POST requests to only HTTP 1.1. Well here is an .htaccess snippet that will do it.

503 Service Unavailable Headers via PHP

Sending a few HTTP headers is a simple way to let visitors and search engines know that your site currently is unavailable. This is useful when you are doing maintenance and don’t need access to the front-end of your site. Simply add the rules when your site is down, and then remove them once everything […]

Canonical URLs for a single page site

In this tutorial, I share a handful of .htaccess techniques for implementing canonical URLs for single-page websites. Also referred to as “brochure” sites (among other things). These are all plug-&-play code snippets, just add to any .htaccess-capable site and enjoy the SEO benefits of having canonical URLs. I use these snippets on my sites, such […]

Media Temple Server Down

Having issues with Media Temple Grid and DV servers? Losing sales, clients, and business? It’s a depressing, nauseating feeling no doubt. Unfortunately there is not a lot that we, as customers, can do when the servers go down. To help keep your sanity, here is a list of resources for keeping an eye on things, […]

Including Arrays in URI Requests

Some esoteric code phenomena for you today.. in this post I explain how PHP handles arrays when they are included in URL requests (via the query string). It’s something I failed to grasp until doing some in-depth work developing my professional WordPress firewall plugin. Now let’s jump in..

Canonical www via .htaccess

Creating canonical URLs for your site is an important part of good SEO. In this quick post, we’ll look at several .htaccess techniques for removing and requiring the www prefix, and additionally we’ll see how to remove any index.php appendage from all URIs.

WordPress Fix Image Upload Errors

Here are some quick tips to help troubleshoot and fix image and file upload errors in WordPress. Hopefully it helps someone out there get things back on track with their uploaded images. I know it can be frustrating!

Apache Request Method Types

Here is a list of all types of Apache Request methods. GET PUT POST DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK VERSION_CONTROL CHECKOUT UNCHECKOUT CHECKIN UPDATE LABEL REPORT MKWORKSPACE MKACTIVITY BASELINE_CONTROL MERGE INVALID If you know of any others, let me know — thanks! :)

Cron Notes: Ping External URL with No Output

Working on setting up Cron on ASO server for testing purposes.. just want to ping a URL/file, not save or send any output whatsoever. Here are my notes for future reference.

Share links without sending referrer information

Here is a quick tip for sending links without including any referrer information. I found this service used at WordPress.com.

Limit HTTP Request Size

This .htaccess snippet can be used to restrict the total size of the HTTP request body sent from the client.

Site online but can’t access

Here are a few steps to take if a website is online but you are not able to access it.