[wp-testers] Query strings confuse rewrite permalinks
Andy Skelton
skeltoac at gmail.com
Tue Aug 9 19:02:26 GMT 2005
On 8/7/05, Robert Deaton <false.hopes at gmail.com> wrote:
> A hook exists to add custom rewrite rules. I believe you should be
> able to use this to avoid query strings if mod_rewrite is enabled.
After getting beat up time and again by the complexities of WP_Rewrite
et al, I decided to continue using query strings and simply hide the
fact from WP. The plugin strips $_SERVER['QUERY_STRING'] and
$_SERVER['REQUEST_URI'] of any related query strings with
preg_replace, leaving $_GET fully intact.
Whereas before this URL would boot me to the home page, now it gives
me the correct post:
http://www.andyskelton.com/2005/08/08/testing-botd/?botd=nocache
However, I am only stripping botd values. This URL still breaks the
rewrite system and sends me to the home page:
http://www.andyskelton.com/2005/08/08/testing-botd/?foo=bar
At the risk of sounding insolent, I think query strings are invaluable
and should be tolerated by the rewrite system. Is it the intention to
let a permalink rewrite URL be invalidated by appending an
unrecognized query string or is that a bug?
Thank you,
Andy Skelton
More information about the wp-testers
mailing list