title: Url Rewriting with hidden rules
body: <p>I'm currently facing a problem with one url rewriting rule. 
  [I'm running on Apache 2.4.23]</p>
  
  <p>I'm trying to make a redirection for certain pages. Here are my rules :</p>
  
  <pre><code>RewriteRule ^clubs[^/]?$  club.php?job=display [L,NC]&lt;br /&gt;
  RewriteRule ^club/([^/]*)$   club.php?job=detail&amp;name=$1 [L]&lt;br /&gt;
  RewriteCond %{REQUEST_URI}  !club\.php                                      [NC]&lt;br /&gt;
  RewriteRule ^club/([^/]+)/?(.+)?/?       club.php?job=detail&amp;name=$1&amp;action=$2           [NC,L]
  </code></pre>
  
  <p>The problem is that rule for "clubs" is working well. But those for club aren't working.
  If I go to the url <a href="http://mysite/club" rel="nofollow noreferrer">http://mysite/club</a> , I can see that it has already been rewrited to <a href="http://mysite/club.php" rel="nofollow noreferrer">http://mysite/club.php</a>?<br />
  And if I go to the url <a href="http://mysite/club/clubName" rel="nofollow noreferrer">http://mysite/club/clubName</a> , I can see that it has already been rewrited to <a href="http://mysite/club.php/clubName" rel="nofollow noreferrer">http://mysite/club.php/clubName</a>?<br />
  And all of this because the file club.php exists. If I had redirected 'club' to 'anythingElseButNonExistingFile' , it would have worked.
  Even if I remove all the lines in my .htaccess file, this happens. So I suppose there's another .htaccess file with other rules somewhere I do not have access to.</p>
  
  <p>So I changed my rules for 'club' to :<br /></p>
  
  <pre><code>RewriteRule ^club.php/(.+)                     club.php?job=detail&amp;name=$1 [L]&lt;br /&gt;
  RewriteCond %{REQUEST_URI}                  !club\.php                                     [NC]&lt;br /&gt;
  RewriteRule ^club/([^/]+)/?(.+)?/?        club.php?job=detail&amp;name=$1&amp;action=$2          [NC,L]&lt;br /&gt;
  </code></pre>
  
  <p>So now, if I try to go to :<br />
  <a href="http://mysite/club/clubName" rel="nofollow noreferrer">http://mysite/club/clubName</a>, it works, it redirects to <br /><a href="http://mysite/club.php/clubName?job=detail&amp;name=clubName" rel="nofollow noreferrer">http://mysite/club.php/clubName?job=detail&amp;name=clubName</a><br />
  Not nice but working...<br /></p>
  
  <p>But if I try to go to <a href="http://mySite/club/clubName/addPhoto" rel="nofollow noreferrer">http://mySite/club/clubName/addPhoto</a>, url is not properly rewritten. I get :
  <a href="http://club.php/clubName/addPhoto?job=detail&amp;name=clubName%2FaddPhoto" rel="nofollow noreferrer">http://club.php/clubName/addPhoto?job=detail&amp;name=clubName%2FaddPhoto</a>
  I don't know how to get rid of this...</p>
  
  <p>I hope this is not too much confused and that someone will have a solution... Thanks in advance !</p>