title: Apache RewriteRule in httpd.conf
body: <p>I have an URL <strong><a href="http://10.20.109.99:10034/a/b/c/d/index.html" rel="nofollow">http://10.20.109.99:10034/a/b/c/d/index.html</a></strong> hosted in Apache Server. I would like to use RewriteRule to shorten the URL to <strong><a href="http://10.20.109.99:10034/d/index.html" rel="nofollow">http://10.20.109.99:10034/d/index.html</a></strong> by ignoring the a/b/c. I tried the rule: </p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  RewriteEngine On
  RewriteRule ^http://10.20.109.99:10034/d/index.html$ http://10.20.109.99:10034/a/b/c/d/index.html [R,L]
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>and it works when I key in the shortened URL in the browser address bar, however, in the address bar, the URL will change back to the long URL after the redirect and subsequently, when I click on other menu link URL like <a href="http://10.20.109.99:10034/a/b/c/d/FAQ.html" rel="nofollow">http://10.20.109.99:10034/a/b/c/d/FAQ.html</a>, the long URL will appear back in the address bar.</p>
  
  <p>The thing I want to archive is when ever I do anything like key in URL address or click on other menu URL (within same <strong>d</strong> folder), the URL in the address bar will always show the shorten one <a href="http://10.20.109.99:10034/d/[the_pages].html" rel="nofollow">http://10.20.109.99:10034/d/[the_pages].html</a> instead of going back to the long URL.</p>
  
  <p>Thanks.</p>