title: How to redirect user to another location from particular folder if there is no extension(like .png,.jpg) exist at the end of url
body: <p>I want to redirect all url of particular folder to another location if there is no extension exist at the end of url.</p>
  
  <p>I have "Test" folder in the server.</p>
  
  <p>my url are like</p>
  
  <pre><code>www.example.com/Test/abc
  www.example.com/Test/abc1
  www.example.com/Test/abc2
  </code></pre>
  
  <p>So i want that when user click on these url then it will be redirect to the index page(www.example.com/index.php)</p>
  
  <p>But if url have extension at the end then it should not be redirect.</p>
  
  <p>like <code>www.example.com/Test/logo.jpg, www.example.com/Test/p1.mp3</code></p>
  
  <p>I have tried to do it using .htaccess file. and i am able to redirect to index page but my problem is that when user click on any image url or mp3 url then it will also redirect user to index page.</p>
  
  <p>here is my .htaccess file</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  Options +SymLinksIfOwnerMatch 
  RewriteEngine On 
  Redirect /Test http://example.com/index.php?id=
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>It redirect me to the following url</p>
  
  <pre><code>http://example.com/index.php?id=abc (if i clicked on http://example.com/Test/abc)
  </code></pre>
  
  <p>Any Idea?</p>