title: Htaccess URL rewrite with get parameters
body: <p>so I've recently changed my website's file structure a little bit and now need to redirect my old URLs to the new ones.</p>
  <p>This is what the old URLs looked like:<br><code>example.com/script?id=1&amp;title=TitleHere</code></p>
  <p>the script.php is now in a sub-folder with the name &quot;script&quot;, so the new URL is:<br><code>example.com/script/1/TitleHere</code> (This one is already working, but I still need my old urls to redirect to this pattern.)</p>
  <p>This is what I tried in my htaccess:<br><code>RewriteRule ^script?id=([0-9]+)&amp;title=(.*) /script/$2-$1 [L,R=301]</code></p>
  <p>Not sure if this is of importance but I am also using these htaccess settings:</p>
  <pre><code>Options -Indexes 
  RewriteEngine on
  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}\.html -f
  RewriteRule ^(.*)$ $1.html [NC,L]
  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}\.php -f
  RewriteRule ^(.*)$ $1.php [NC,L]
  </code></pre>
  <p>Sadly my attempt didn't bring me any success, it's just throwing a 403 and I think that's because a folder named &quot;script&quot; already exists but I am not sure. Help would be highly appreciated!</p>