trying to display search results; infinite redirect loop