Add rewrite engine for apache2

Fix #2