[wp-testers] Query strings confuse rewrite permalinks

Robert Deaton false.hopes at gmail.com
Sun Aug 7 23:29:39 GMT 2005


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.

On 8/7/05, Andy Skelton <skeltoac at gmail.com> wrote:
> Hi guys and gals, I guess I should have subscribed to this list ages
> ago. Now one of my BOTD plugin testers is having an issue with
> 1.6-ALPHA-2.
> 
> My plugin depends on the ability to receive query strings on permalink
> pages. This was seamless in 1.5 in almost all cases; only some sites
> with index.php in the permalink structure would lose additional query
> strings.
> 
> Now, whenever I add a query string to a rewrite-enabled permalink URL,
> the query string is preserved in $_GET['foo'] but is_single() is FALSE
> and is_home() is TRUE. This causes WP to load the home template with
> the default query and, less critically, it causes problems with my
> plugin.
> 
> I dug a little deeper and found $wp_query->query and
> $wp_query->query_vars coming up blank when I do something like this:
> http://gilford.textdrive.com/~acskelto/2005/08/07/hello-world/?foo=bar
> so instead of showing the "Hello, World!" post, it shows the home page.
> 
> If I had any clue about the WP_Rewrite class I'd look deeper.
> 
> Andy Skelton
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
> 


-- 
--Robert Deaton
http://somethingunpredictable.com


More information about the wp-testers mailing list