Many hours have been spent today at kc web design Kent pulling hair and banging heads over a very frustrating WordPress problem. $_get requests to retrieve simple query string variables from a WordPress URL just wouldn’t work. We tried everything and spent hours trying to add functions to deal with custom variables, check PHP configs and test theme templates all with no luck. Whatever we tried just did not work. So, for everyone out there having the same issues (and we saw a lot of you!) here is the stupidly simple answer…

Make sure the rewrite module is enabled and working in Apache!

Yes, it’s that simple! But it was very hard to track down because even with the rewrite module disabled the WordPress custom permalinks would still work, they just wouldn’t pass the variables to the page. Something in the rewrite module deals with the query string and without it enabled they wouldn’t work with a custom permalink structure. Whatever was in the htaccess file would still redirect to the correct permalink page but ignored the variables in the query string.

A very frustrating day has been spent searching for a fix so I hope anyone else having this problem finds this post and uses this fix for $_get requests not working with WordPress custom permalinks.