When i add seo friendly url on opencart like ‘abcd-test’ or ‘abcd-test.htm’ it worked.
but when i added ‘abcd-test/22123.htm’, IT redirected to ‘www.example.com/abcd-test/22123.htm’ but it displayed
The page you requested cannot be found!
I already have a website in another framework other than opencart which is doing well on google ranking. but i need to move this website on opencart and i need to make same url for most of the pages. during that process my existing website have url like “www.example.com/category-s/12234.htm
so will any one facing same problem and any one have the solution for this situation.
2
Answers
so if I am in
www.example.com/test-abc
, it is category page and if I am inwww.example.com/test-abc/12234.htm
, it means It is product page which beloigs totest-abc
category.You are not able to due to the way that OpenCart’s router works. It takes the URL and delimits it on the forward slash. It then matches the key that is between the slashes to a variable value and ultimately routes based on that variable value.
For example:
http://mysight.com/one/two/three
would be equivalent to something likehttp://mysight.com/index.php?var1=1&var2=2&var3=3
.Note: This example is not based on an OpenCart page it is merely explaining how OpenCart’s router translates to raw PHP.
By including forward slashes in your SEO URL aliases OpenCart thinks that it needs to match keys that just don’t exist and because it can’t route to a valid page it simply redirects you to a default 404 page.