Redirect issue with subcategory path
-
12-12-2019 - |
Question
I am just wondering why my subcategory path not redirect to cms page when i click on any cms page. When i click on cms page the subcategory path redirects to cms with parent category url. please go through this site click here
EX: www.example.com/category/subcategory... now click on about us page it will redirect to www.example.com/category/aboutus
Any idea would be appreciated.
Solution
It looks you use relative links in your html code eg.:
<li><a title="About Us" href="about-us">About Us</a></li>
You should change them to absolute ones by adding slash there:
<li><a title="About Us" href="/about-us">About Us</a></li>
If it's done in template file, it will be even better to use site URL helper:
<li><a title="About Us" href="<?php echo $this->getUrl('about-us')?>">About Us</a></li>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange