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.

1

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

|improve this answer|||||
  • I was already tried but not working... – Anas Mansuri Dec 16 '19 at 10:41
  • @AnasMansuri what did you try and how did it not work? – Barry Dec 16 '19 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 – Anas Mansuri Dec 16 '19 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 '19 at 10:46
  • I was done, its return 404.. – Anas Mansuri Dec 16 '19 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]
|improve this answer|||||
  • I'm trying but its return 500 – Anas Mansuri Dec 16 '19 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.