3.2.0 Affect on Redirect Query Strings
-
A change in 3.2.0 that unexpectedly broke some functionality.
With 3.2 came the note: Fixed a request that only differed from the saved permalink by a trailing slash failing to resolve — it now redirects to the canonical permalink instead.
Innocuous enough, but I lost all of my PPC tracking overnight. One of my ad destinations was set to
/landing-pagerather than/landing-page/. Before 3.2.0 that URL resolved and served directly. Now it redirects, and the redirect arrives with the query string stripped, so every UTM parameter and the gclid are gone by the time the page renders.The cause appears to be the interaction with cached hosting rather than the redirect itself. Managed WordPress hosts cache 301s, and a cached redirect replays a stored Location header, discarding whatever query string the visitor arrived with.
Sending
Cache-Control: no-storewith the redirect would prevent hosts from caching it, which I think resolves this generally. Anyone running paid traffic on managed WordPress hosting is likely affected and unlikely to notice, since the page still loads fine.I’ve rolled back for now. Alternatively, surfacing
custom_permalinks_avoid_redirectas a settings toggle, something like “don’t redirect trailing-slash variants”, would cover me without a theme hook.
You must be logged in to reply to this topic.