Title: [Plugin: GRA4 Social Network] rewrite_rules_array. 404 with POST
Last modified: August 20, 2016

---

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

 *  Resolved [trof](https://wordpress.org/support/users/trof/)
 * (@trof)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/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](http://myserver.com/wp/gra4/whatever/i/put/here)_
   pretty much is reflected to: _[http://myserver.com/wp/gra4](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)

 *  Thread Starter [trof](https://wordpress.org/support/users/trof/)
 * (@trof)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-gra4-social-network-rewrite_rules_array-404-with-post/#post-2945371)
 * Well, I solved it:
    WordPress does not like forms with input fields with `<...
   name="name" ...>`
 * Works fine now: [http://wmexp.com/wordpress/gra4/](http://wmexp.com/wordpress/gra4/)

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: GRA4 Social Network] rewrite_rules_array. 404 with POST’ is 
closed to new replies.

## Tags

 * [flush_rules()](https://wordpress.org/support/topic-tag/flush_rules/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [WP_Rewrite](https://wordpress.org/support/topic-tag/wp_rewrite/)

 * 1 reply
 * 1 participant
 * Last reply from: [trof](https://wordpress.org/support/users/trof/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-gra4-social-network-rewrite_rules_array-404-with-post/#post-2945371)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
