title: When trying to redirect using HTACESS, a string "/redirect:/" gets embedded with the url
body: <p>I have setup two domains to point to the same hosting server. For eg: the domains be : </p>
  
  <ol>
  <li>example1.com</li>
  <li>example2.com</li>
  </ol>
  
  <p>I have created a directory called 'home' in my root, and whenever the 2nd domain is accessed, it should get redirected to the home directory. 
  For eg: example2.com/post.php should get redirected to example2.com/home/post.php
  I have done this by creating an htaccess file in my root directory with the following contents:</p>
  
  <hr>
  
  <pre><code>Options +FollowSymLinks 
  RewriteEngine On
  RewriteCond %{HTTP_HOST} example2.com$ [NC]
  RewriteCond %{REQUEST_URI} !home
  RewriteRule ^(.*)$ ./home/$1 
  </code></pre>
  
  <hr>
  
  <p>This is working perfectly. Now, i have a second requirement where i need to redirect users to a php file  (post.php) inside home directory whenever the user accesses the url example2.com/gallery/somestring.</p>
  
  <p>So, i created a second htaccess file in my home directory and entered the following code: </p>
  
  <hr>
  
  <pre><code>Options +FollowSymLinks
  
  RewriteEngine On
  RewriteRule ^gallery/([^/]+)$ post.php?post=$1 
  </code></pre>
  
  <hr>
  
  <p>But, whenever i try to access the url example2.com/gallery/somestring, it shows a strange 404 Not Found error : </p>
  
  <hr>
  
  <pre><code>The requested URL /home/redirect:/home/gallery.html/somestring/somestring was not found on this server.
  
  Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
  </code></pre>
  
  <hr>
  
  <p>Here. "redirect:" string is getting concatenated to the redirected URL somehow. </p>
  
  <p>Can any one please give me some idea as to why its happening ??</p>