Codex

Rewrite API

WordPress allows theme and plugin developers to programmatically specify new, custom rewrite rules. The following functions (which are mostly aliases for WP_Rewrite methods) can be used to achieve this.

Note that these rules are usually called inside the init hook. Furthermore, permalinks will need to be refreshed (you can do this from your admin under Settings > Permalinks) before the rewrite changes will take effect.

add_rewrite_rule() 
Allows you to specify new, custom rewrite rules.
add_rewrite_tag() 
Can be used to allow WordPress to recognize custom variables (particularly custom querystring variables).
add_rewrite_endpoint() 
Add a new endpoint like /trackback/
add_feed()
Add a new feed type like /atom1/

Related Articles

The WP_Rewrite Class