title: Remove url .php extension and parameters of get request?
body: <p>My URL is: </p>
  
  <pre><code>https://example.com/detail.php?id=56&amp;subcat=11
  </code></pre>
  
  <p>I need like this:</p>
  
  <pre><code>https://example.com/detail/56/11
  </code></pre>
  
  <p>Using .htaccess file i am not able to remove the parameter names (id, subcat) and question mark(?). I have removed only .PHP extension.</p>
  
  <pre><code>Options +FollowSymLinks -MultiViews
  # Turn mod_rewrite on
  RewriteEngine On
  RewriteBase /
  
  ## don't touch /forum URIs
  RewriteRule ^forums/ - [L,NC]
  
  RewriteCond %{THE_REQUEST} \s/+products(?:\.php)?\?id=([0-9]+) [NC]
  RewriteRule ^ products/%1? [R,L]
  
  RewriteRule ^products/([0-9]+)/?$ products.php?id=$1 [L,QSA]
  
  ## hide .php extension snippet
  # To externally redirect /dir/foo.php to /dir/foo
  RewriteCond %{THE_REQUEST} \s([^.]+)\.php [NC]
  RewriteRule ^ %1 [R,L]
  
  # To internally forward /dir/foo to /dir/foo.php
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}.php -f
  RewriteRule ^(.+?)/?$ $1.php [L]
  </code></pre>
  
  <p>Thank you.</p>