Fix a bug when when rewrite url isn't activated and some style fix