WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: GRA4 Social Network] rewrite_rules_array. 404 with POST

[Resolved] [Plugin: GRA4 Social Network] rewrite_rules_array. 404 with POST

  • Hi all.

    In my plugin I’m doing something like

    function gra4_set_seo_friendly_rules($args)
    {
    	$new = array();
    	$new['(gra4)(/[-/0-9a-zA-Z]+)?/(.*)$'] = 'index.php?pagename=$matches[1]';
    	return $new + $args;
    }
    add_filter("rewrite_rules_array", "gra4_set_seo_friendly_rules");

    I also do $wp_rewrite->flush_rules(); on init.
    I guess it should cover all URLs ‘longer’ than my plugin page (the plugin inserts content into a page),so anything like:
    http://myserver.com/wp/gra4/whatever/i/put/here
    pretty much is reflected to:
    http://myserver.com/wp/gra4
    with no 404 pages.
    That’s pretty much how it works. Well, almost =)
    On some URLs it still fires 404. What really surprises me, it happens only when POST data is present – the same page with GET only works ok. It also happens not to all URLs (so far I discovered only two malfunctions, allthough both with plenty of POST data), majority POST pages work just fine.
    I commented all my code out… well, it does not matter, I guess when I see This is somewhat embarrassing, isn’t it? it does not even hit my code yet, right?

    Any ides? I kinda lost, don’t even know where to start digging…

    Thank you.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: GRA4 Social Network] rewrite_rules_array. 404 with POST’ is closed to new replies.