Reputation: 890
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.
Upvotes: 3
Views: 1185
Reputation: 890
I found the answer:
In opencart To dayplay
www.example.com/test-abc/12234.htm
Here we need to have category or manufacturer with seo keyword
test-abc
and12234.htm
in product seo url.
Url/product
Url/parent-cat/product
Url/parent/child/product
so if I am in www.example.com/test-abc
,
it is category page and if I am in www.example.com/test-abc/12234.htm
, it means It is product page which beloigs to test-abc
category.
it work me
Upvotes: 2
Reputation: 1136
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 like http://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.
Upvotes: 2