add prototype check for redirect in indexing.