How to implement rewrite and redirect using htacees
<p>I have successfully rewrote the following:
OLD: wwww.example.com/company.php
NEW: wwww.example.com/company
 Using this code:</p>

<pre><code>RewriteEngine On
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^company/?$ company.php [NC,L]
</code></pre>

<p>But when I go to /company.php, it does not automatically redirect me to /company . Why? I tried [r=301,L],  instead of [NC,L], but did not help: How to resolve this?</p>