title: PHP URL Rewriting and Anchor Javascript
body: <p>i'm trying to develop with MVC, i access to the pages like that:</p>
  
  <pre><code>http://localhost/app/dashboard/index
  </code></pre>
  
  <p>dashboard is the controller et index is the function in the class controller dashboard.</p>
  
  <p>I have a dispatcher page (index.php) which redirect and call the right files.
  I have a .htaccess that rewrite urls</p>
  
  <pre><code>RewriteEngine on
  RewriteRule ^([a-zA-Z0-9\-\_\/]*)$ index.php?p=$1
  </code></pre>
  
  <p>So when i access to <code>http://localhost/app/dashboard/index</code>
  $_GET['p'] => dashboard/index, so i can explode this array and call the classes...</p>
  
  <p>That's work fine, but my problem is when i make a link suppose to launch a jquery script like that:</p>
  
  <pre><code>&lt;a href="#" data-toggle="myID"&gt;Item 1&lt;/a&gt;
  </code></pre>
  
  <p>I return to the home page: <code>http://localhost/app</code></p>
  
  <p>I tried to make my link like that:</p>
  
  <pre><code>&lt;a href="dashboard/index/#" data-toggle="myID"&gt;Item 1&lt;/a&gt; or
  &lt;a href="http://localhost/app/dashboard/index/#" data-toggle="myID"&gt;Item 1&lt;/a&gt;
  </code></pre>
  
  <p>but it didn't work!</p>
  
  <p>Please help!
  Alex</p>