title: Javascript window.location search for "#" never returns true
body: <p>I'm trying to set up a redirector so that when my AJAX functions change the hash part of the URI, the link is still directly accessible should it be copied and pasted.  My current function is below; however, it always returns false!</p>
  
  <pre><code>    //If a hash is found, redirect it
      var current_uri = String(window.location);
  
      if (current_uri.search('/\#/') != -1) {
              var current_uri_array = current_uri.split('#');
              window.location = current_uri[1];
      }
  </code></pre>
  
  <p>How can I change the code to make this work?  Is there a better way of doing this?
  Thanks for your help.</p>
  
  <p>Code updated to:</p>
  
  <pre><code>if (window.location.hash) {
      window.location = window.location.hash.substring(1);
  </code></pre>
  
  <p>}</p>
  
  <p>Which worked.</p>