REFACTORING: rewrite rules and proxy. 

See christophe-lejeune/cassandre_2_php@ 0e21a894204218371105e59dbbb4abb28fb6fc65