title: Remove .php extension with .htaccess
body: <p>Yes, I've read the Apache manual and searched here. For some reason I simply cannot get this to work. The closest I've come is having it remove the extension, but it points back to the root directory. I want this to just work in the directory that contains the <code>.htaccess</code> file.</p>
  <p>I need to do three things with the <code>.htaccess</code> file.</p>
  <ol>
  <li>I need it to remove the <code>.php</code></li>
  </ol>
  <p>a. I have several pages that use tabs and the <a href="http://en.wikipedia.org/wiki/Uniform_Resource_Locator" rel="nofollow noreferrer">URL</a> looks like <code>page.php#tab</code> - is this possible?</p>
  <p>b. I have one page that uses a session ID appended to the URL to make sure you came from the right place, <code>www.domain.example/download-software.php?abcdefg</code>.</p>
  <p>Is this possible? Also in doing this, do I need to remove <code>.php</code> from the links in my header nav include file? Should <code>IE &quot;&lt;a href=&quot;support.php&quot;&gt;support&lt;/a&gt;&quot; be &lt;a href=&quot;support&quot;&gt;support&lt;/a&gt;?</code></p>
  <ol start="2">
  <li>I would like it to force <code>www</code> before every URL, so it's not <code>domain.example</code>, but <code>www.domain.example/page</code>.</li>
  <li>I would like to remove all trailing slashes from pages.</li>
  </ol>
  <p>I'll keep looking, trying, etc. Would being in a sub directory cause any issues?</p>