title: Getting two variables in the URL with htaccess
body: <p>What way it is to be to get two GET methods in the URL by htaccess?</p>
  
  <pre><code>RewriteRule ^adm/(.*)$ adm.php?mode=$1
  </code></pre>
  
  <p>I've used that for the example URL:</p>
  
  <pre><code>http://www.domain.com/adm/thismode
  </code></pre>
  
  <p>Now I want to get two methods like:</p>
  
  <pre><code>http://www.domain.com/adm/thismode/othermode
  </code></pre>
  
  <p>I've tried this:</p>
  
  <pre><code>RewriteRule ^adm/(.*)$/(.*)$ adm.php?mode=$1&amp;othermode=$2
  </code></pre>
  
  <p>But doesn't seem to work... how do I get it to do that?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>$mode1 = $_GET['mode'];</p>
  
  <p>$mode2 = $_GET['othermode'];</p>
  
  <p>Like this...</p>
  
  <p><strong>EDIT AGAIN:</strong></p>
  
  <pre><code>http://www.domain.com/adm/generated/pass/6z9c4q9k8p
  </code></pre>
  
  <p>Right... this is the URL it has to do</p>
  
  <p>And in the PHP it has this:</p>
  
  <pre><code>if($mode == "generated")
  </code></pre>
  
  <p>I want the PHP to see if the mode is set in the URL and the generated password is the other GET</p>
  
  <p>I put the htaccess as this way:</p>
  
  <pre><code>RewriteRule ^adm/(.*)/(.*)$ adm.php?mode=$1&amp;generated=$2
  </code></pre>
  
  <p>The PHP will also grab the generated password in the URL and display it on the page.</p>