added url rewrite
temnplate handling
404 template