Add options to fix Redirect loop & encoding issue