0

I am asking the same question that has already been asked several times but none of them has answered so far.

I want to redirect the website to the clone folder on the web server.

Following URL was previously in use.

http://www.websiteurl.com/vshop/index.php?page=shop.product_details&product_id=440

Now i've a new setup on the same URL but different folder.

http://www.websiteurl.com/payonline/index.php?page=shop.product_details&product_id=440

The first folder name is "vshop" and 2nd one is "payonline".

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.

Please do also tell me if .htaccess is better of php script will work fine. Thanks

2
  • 1
    Do you mean changing the folder name rather than the domain? Commented Feb 24, 2015 at 9:47
  • here I wanted to change the folder name, but then i decided to remove only folder in the redirected url. . BTW. domain is same. Commented Feb 24, 2015 at 15:05

1 Answer 1

2

This Htaccess RewriteRule should do it for you.

RewriteEngine On
RewriteRule ^vshop/(.*) payonline/$1 [QSA] 
Sign up to request clarification or add additional context in comments.

3 Comments

Thanks.. let me try. and what if need to remove payonline folder and redirect it to main site?.
wow.. it worked. thank you.. I just remvoed vshop and payonline RewriteEngine On' RewriteRult ^/(.*) /$1 [QSA] but it keeps vshop on url
Glad it worked for you and helped you solve your problem(s) :D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.