Custom rewrite rules in Wordpress

admin

Administrator
Staff member
I'm in trouble with the internal wordpress rewrite rules.
I've read this thread but I still can't get any results: <a href="https://stackoverflow.com/questions/2210826/need-help-with-wp-rewrite-in-a-wordpress-plugin">wp_rewrite in a WordPress Plugin</a>

I explain my situation:

1) I have a page_template called 'myplugin_template.php' associated to a wordpress page called "mypage".

Code:
&lt;?php
get_header();
switch ($_GET['action']) {
  case = "show" {
  echo $_GET['say'];
  }
}
get_footer();
?&gt;

2) I need to create a rewrite rule for this link:

<blockquote>
<a href="http://myblog/index.php?pagename=mypage&amp;action=show&amp;say=hello_world" rel="nofollow noreferrer">http://myblog/index.php?pagename=mypage&amp;action=show&amp;say=hello_world</a>
</blockquote>

If I use this url all the things works without problems but I'd like to achieve this result:

Code:
http://myblog/mypage/say/hello_world/

I really don't want to hack my .htaccess file but I don't know how I can do this with the internal wordpress rewriter.