2

I need some help for url redirection in Magento 2. I want to show my own url in the address bar but the page should be from another url.

For example, if the link is www.xyz.com/blog/post/post.html, then I want it changed to www.xyz.com/post.html in the address bar. How can I achieve this?

  • using routing mechanism of magento – Himanshu Dec 27 '18 at 6:15
2

You can use Url Rewrite for your requirement.
In Magento admin goto Marketing->SEO & Search->and tap URL Rewrites.
Click “Add URL Rewrite” button.
In Request path add blog/post/post.html
In Target Path add post.html
Select Redirect Type as Permanent (301)

enter image description here

That's it.

  • this redirection is not working for me @Rizwan – Charanjeet Dec 27 '18 at 6:43
  • want to show only /post.html but it is still showing /blog/post/post.html after redirection – Charanjeet Dec 27 '18 at 6:47
  • post.html showing 404 error.Can I point the post to post.html instead of /blog/post.html. – Charanjeet Dec 27 '18 at 6:51
  • I am using better blog extension. – Charanjeet Dec 27 '18 at 6:52
  • Yes, you can try post to post.html instead of /blog/post.html. – Rizwan Khan Dec 27 '18 at 7:02

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.