How to check whether url contains "main.php"
<p>I need to be able to know if the URL contains "main.php".
How can I do this in jQuery?</p>

<p>I tried this</p>

<pre><code>$(function() {
    if ( document.location.href.indexOf('main.php') &gt; -1 ) {
        alert('hi');
    }
});
</code></pre>

<p>The full url would be www.flirtwithme.co/main.php</p>

<p>What's the most efficent way to capture the main.php?</p>

<p>Also I'm using hash like this</p>

<blockquote>
  <p><a href="http://localhost/flirtwithme.co/main.php#profile" rel="nofollow">http://localhost/flirtwithme.co/main.php#profile</a></p>
</blockquote>

<p>with <code>$(window).bind('hashchange')</code></p>

<p>So how can I capture main.php when it doesn't have a hash value. This is the real question I'm after, as I have hash changing working. I want the URL alone (main.php) to be controllable.</p>
