tags:

views:

9

answers:

1

Hi All,

Just wondering where the best place (file) to place the API hook rewrite_rules_array would be?

Cheers

Will

A: 

I think the best place for rewrite rules is the .htaccess file. The functions provided by WP just create this for you.

See http://articles.sitepoint.com/article/guide-url-rewriting to learn more about URL rewriting.

While abstraction is good (as in the WP rewrite functions), I think it is best to write your own rewrite rules in .htaccess to reduce problems when moving from one system to another. It is much easier to change one file then to find a function that is causing problems and change the code.

Todd Moses