title: Rewritting PHP URL using .htaccess
body: <p>I have a URL in the form of </p>
  
  <p><code>motors.com/project?id=1&amp;title=british-car-auctions</code> </p>
  
  <p>And wish to change it to </p>
  
  <p><code>motors.com/project/1/british-car-auctions</code></p>
  
  <p>I have used solutions from <a href="https://stackoverflow.com/questions/16388959/url-rewriting-with-php">URL rewriting with PHP</a> and <a href="https://stackoverflow.com/questions/52399307/rewritting-url-by-htaccess">Rewritting URL by htaccess</a> with no luck. As for the <code>title</code> section of the URL, I am calling this exact text with dashes from the database, which shouldn't be an issue. Any possible solutions to this problem?</p>
  
  <pre><code># mode_rewrite starts here
  
  RewriteEngine on
  
  # does apply existing directories, meaning that if the foilder exists 
  
  RewriteCond %{REQUESTED_FILENAME} !-d
  
  # check for file in directory with .hmtl extension
  
  RewriteCond %{REQUEST_FILENAME}\.php -f
  
  # here we actually show the page that has the .html extension
  
  RewriteRule ^(.*)$ $1.php [NC,L]
  
  #-----------------------------------------------------
  
  RewriteCond %{REQUESTED_FILENAME} !-d
  
  # check for file in directory with .hmtl extension
  
  RewriteCond %{REQUEST_FILENAME}\.html -f
  
  # here we actually show the page that has the .html extension
  
  RewriteRule ^(.*)$ $1.html [NC,L]
  
  RewriteCond %{REQUEST_FILENAME} !-d
  
  RewriteCond %{REQUEST_FILENAME}\.php -f
  
  RewriteRule ^news/([0-9]+)(/?)$/([0-9a-zA-Z\s_]+) news/article.php?id=$1&amp;title=$2 [NC,L]
  </code></pre>