adds support for wp rewrite structure