title: How to Get Current Directory Name in mod_rewrite(.htaccess)
body: <p>On my servers I use the following rewrite request:</p>
  
  <pre><code>RewriteRule ^profile/([^/]*)/([^/]*)\.html$ /dir_name/kip_dashboard.php?userID=$1 [L]
  </code></pre>
  
  <p>I am using same <code>.htaccess</code> file in two different location (localhost &amp; server).</p>
  
  <p>Ex.</p>
  
  <pre><code>http://localhost/dir_l/      \\Localhost
  http://server.com/dir_ser/   \\Server
  </code></pre>
  
  <p>How can I get the current directory automatically in <code>.htaccess.</code></p>
  
  <pre><code>(Ex: RewriteRule ^profile/([^/]*)/([^/]*)\.html$ /{HTTP_DIRECTORY}kip_dashboard.php?userID=$1 [L])
  </code></pre>
  
  <p>like this.</p>