1

I want to redirect another url.

 https://example.com/store1/lstoreviewcode/ 
 https://example.com/store2/cstoreviewcode/ 

to replace with

 https://example.com/store1/storeviewcode/
 https://example.com/store2/storeviewcode/

I want to change only URL, content are same.

2 Answers 2

1

You can manage URL rewrites in Marketing -> (SEO & Search) -> URL rewrites please see Magento docs for more information.

6
  • I was already tried but not working... Dec 16, 2019 at 10:41
  • @AnasMansuri what did you try and how did it not work?
    – Barry
    Dec 16, 2019 at 10:42
  • I don't have any example.com/store1/storeviewcode path for this. I want only redirect here.. for same content. which is loaded in ******/lstoreviewcode Dec 16, 2019 at 10:42
  • It looks like you are including the domain, that won't work. If you set Request Path = store1/lstoreviewcode and Target Path = 'store1/storeviewcode/' what happens? Also as you are mentioning store code how about just lstoreviewcode and storeviewcode?
    – Barry
    Dec 16, 2019 at 10:46
  • I was done, its return 404.. Dec 16, 2019 at 10:49
0

Add this in .htaccess

RewriteCond %{HTTP_HOST} !^example.com/store1/lstoreviewcode/ $ [NC]
RewriteRule ^(.*)$ https://example.com/store1/lstoreviewcode/$1 [L]
RewriteCond %{HTTP_HOST} !^example.com/store2/cstoreviewcode/ $ [NC]
RewriteRule ^(.*)$ https://example.com/store2/storeviewcode/$1 [L]
1
  • I'm trying but its return 500 Dec 16, 2019 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.