title: PHP redirect website with only domain change
body: <p><strong>I am asking the same question that has already been asked several times but none of them has answered so far.</strong> </p>
  
  <p>I want to redirect the website to the clone folder on the web server.</p>
  
  <p>Following URL was previously in use. </p>
  
  <p><a href="http://www.websiteurl.com/vshop/index.php?page=shop.product_details&amp;product_id=440" rel="nofollow">http://www.websiteurl.com/vshop/index.php?page=shop.product_details&amp;product_id=440</a></p>
  
  <p>Now i've a new setup on the same URL but different folder.</p>
  
  <p><a href="http://www.websiteurl.com/payonline/index.php?page=shop.product_details&amp;product_id=440" rel="nofollow">http://www.websiteurl.com/payonline/index.php?page=shop.product_details&amp;product_id=440</a></p>
  
  <p>The first folder name is "vshop" and 2nd one is "payonline". </p>
  
  <p>Can somebody please tell me how can i keep the complete url, but change the folder name, I don't want to use "search or replace" feature. I might need to change the complete domain. </p>
  
  <p>Please do also tell me if .htaccess is better of php script will work fine. 
  Thanks</p>