remove public dir, writings headers