Match user input to entire url using indexOf