basic rewrite for all parts of the application