title: .htaccess url rewrite behavior being overwritten if filename minus ext. same as url
body: <p>I'm trying to tidy up the URLs and remove the .php extensions from them and such. I'm in the base folder for the website, so there are no parent .htaccess files that could be taking priority or anything. Here's my htaccess code.</p>
  
  <pre><code>RewriteEngine On
  RewriteRule    ^give/?$    give.php    [NC,L]
  </code></pre>
  
  <p>This part gives no real problems, because whatever behavior is overwriting it behaves the same way. But when I add in this other line so it will account for url variables,</p>
  
  <pre><code>RewriteRule    ^give/([0-9]+)/?$    give.php?step=$1    [NC,L]
  </code></pre>
  
  <p>It completely ignores it. However, if I rename give.php to anything else, so it doesn't match the url, it works. For example, using given.php causes it to heed the .htaccess rules. I've never run across this issue before. Is there some server setting I can change so I don't have to give my files odd names?</p>
  
  <p>Also note, I tried changing that first line to redirect to another file, but without changing the actual file name give.php. It ignored my redirect and still loaded the give.php file.</p>
  
  <p>Edit: I've tried changing the order of the 2 rules, I've tried commenting both one rule, then the other to see if they are conflicting with eachother. The best I can figure, the server has some sort of default behavior that directs /give/ to /give.php if no directory of /give/ exists. Because even if I remove both rules, going to /give/ still redirects me to /give.php. Only when I change the filename to given.php will it break that default behavior. I also tried setting the simpler rule to this:</p>
  
  <pre><code>RewriteRule    ^give/?$    resources.php    [NC,L]
  </code></pre>
  
  <p>And as long as the file give.php existed, it still redirected to give.php. If I removed give.php or changed its name, going to /give would then redirect to resources.php</p>