Find in URL string from Array of values?
<p>I am trying to find array values in URL string? check the condition If requested URL contains array values then pass condition otherwise redirect to google.com </p>

<p>example</p>

<pre><code>     $(document).ready(function () {
        var urls = ["/dept/ce/",
                      "/dept/cs",
                      "/dept/career",
                      "/dept/it",
                      "/dept/mkt/",
                      "/dept/Membership/"
                      , "/dept/pr"
                      , "/dept/PS"
                      , "/dept/ta"
                      , "/dept/wc"
                      , "/dept/PubsProducts"
                      , "_layouts/settings.aspx"
                      ,"/_catalogs/masterpage/"];

       //If document.location.href = "http://localhost/dept/ce/default.aspx" 
       //And Array has "/dept/ce" values
       //Now check document.location.href against array values, if    
      //document.location.href contains array values then pass condition otherwise 
      //else condition 
    });
</code></pre>

<p>How to do this?</p>
