Wordpress add_rewrite_rule不起作用。 为什么?

I'm new on Stack Overflow.

I'm working on Wordpress 3.9, and I'm trying to do an URL rewrite with the following method, placed in functions.php:

I use this method:

add_rewrite_rule('^comevado/results/from-([^-]*)-to-([^-]*)-currency-([^-]*)$', '/comevado/results/?from=$matches[1]&to=$matches[2]&currency=$matches[3]', 'top');

But doesn't work.

For the URL rewrite I used this website: http://www.generateit.net/mod-rewrite/index.php

What can I do ?

Thank you all !

The problem can be with your rule, but it's often because you need to FLUSH the old rewrite rules. Do that by the function flush_rewrite_rules (but only run this ONCE, i.e. on plugin activation) unless you need to re-write every page load (generally slow and bad idea). Or just navigate to settings->permalinks in the admin area (flushes the rules on view).