Numbers at the end of a URL Magento 1.9 -
on our website used have loads of links had 4 digits on end of them. looked
www.example.com/example-1234.html.
the urls numbers had overridden normal url
www.example.com/example.html.
we got rid of them truncating core_url_rewrite
table , turned active url's numbers @ end of them 404's.
however, have noticed these numbers have come , i'm not sure why. however, time effecting category urls of our category urls like:
www.example.com/main-category/sub-category-1234/product.html
i found article on stackoverflow useful: magento - removing numbers in url key/product url .
however still don't understand why happening. found function getunusedpath
causing these numbers happen , looks create numbers @ end of url
if ($rewrite && $rewrite->getid()) // , $rewrite` equal $rewrite = $this->getresource()->getrewritebyrequestpath($requestpath, $storeid);
do know can find out
getresource()->getrewritebyrequestpath($requestpath, $storeid);
does? why getting these numbers appearing @ end of url? have setting turned on this? (the file located in
app/code/core/mage/catalog/model/url.php around `line 640`
i tried different types of saving product see if when save magento updates url doesn't work. tried reindex url rewrites , didn't either. have 2 magento websites , on our second magento website isn't happening , core_url_rewrite
table doesn't have of urls numbers in it. why happening 1 of our sites , not other? how can stop urls having numbers added on them , how can find out why being generated?
i have found out happens every time url rewrites reindex script running every time it's reindexed. index
url_rewrites
every time save product. use unique urls our products don't know why happening. have discovered numbers added on end of url has fit regex query
#[0-9a-z/-]+?(-([0-9]+))?('.preg_quote($suffix).')?$#i`
(does know means? have tried in regex calculator , doesn't me make sense of strings fit this?
Comments
Post a Comment