papadoble151 Posted July 9, 2015 Share Posted July 9, 2015 Hello everyone, I need to remove "#" from the url, after applying some filters. For example, I want the link www.mywebsite.com/trainers#/type1 to be www.mywebsite/trainers/type1 Thanks in advance Link to comment Share on other sites More sharing options...
Krystian Podemski Posted July 9, 2015 Share Posted July 9, 2015 What is the point of this? These URLs can be indexed by google. Link to comment Share on other sites More sharing options...
papadoble151 Posted July 9, 2015 Author Share Posted July 9, 2015 What is the point of this? These URLs can be indexed by google. It is one of my client's requirements Link to comment Share on other sites More sharing options...
johnwolf Posted July 14, 2015 Share Posted July 14, 2015 I am pretty sure that you can remove a # sign from the url using module like PrestaShop Pretty URLs. Link to comment Share on other sites More sharing options...
vekia Posted July 14, 2015 Share Posted July 14, 2015 i think that it's not possible to remove the # from the url with pretty urls it's not a matter of this module 3 Link to comment Share on other sites More sharing options...
claudi69 Posted July 24, 2015 Share Posted July 24, 2015 Does anyone know how to remove # after the URL? Is it harmful to SEO to have # showing after the URL e.g. http://domain.com/# this only shows the first time i call the address in the browser. Would really appreciate some solution Link to comment Share on other sites More sharing options...
codemayday Posted July 24, 2015 Share Posted July 24, 2015 Claudi It is not harmful for your SEO to have a # shown after a URL, therefore I'd recommend leaving it if you were just looking to change it because of SEO. Link to comment Share on other sites More sharing options...
Zohaib-fk Posted July 25, 2015 Share Posted July 25, 2015 (edited) Do we have function to automatically remove any junk or speical characters in URLs in prestashop? Like we have function to remove sql injection when accepting data from form. PrestaShop Tutorials Videos [How to do Tasks] https://www.prestashop.com/forums/topic/907438-prestashop-tutorials-videos-how-to-do-tasks/ Edited June 13, 2021 by Zohaib-fk (see edit history) Link to comment Share on other sites More sharing options...
johnwolf Posted July 27, 2015 Share Posted July 27, 2015 By default feature of PrestaShop in Preferences>SEO URLs removes the un-necessary characters from the urls. Only products ids will appears after turning it on. Although these IDs don't too much matter for SEO however, if you've requirement to remove them. You can use Pretty URLs Module of 3rd party. Link to comment Share on other sites More sharing options...
Xtremewarehouse Posted August 7, 2015 Share Posted August 7, 2015 Hi I have similar issue as google bot can't see the url beyond the hashtag here is the warning from google merchant center (In the URL for all your products you have a "#" sign. For eg. http://xtremewarehouse.com.au/1372-max-s-supersize.html#/size-4kg/flavour-banana/ The Google Reviewing software that reviews your data feed doesn't read description in the URL after the "#" symbol which is causing the discrepancy in prices) Any idea what can be done please. Link to comment Share on other sites More sharing options...
mikesp2 Posted August 8, 2016 Share Posted August 8, 2016 Indeed. BUMP ! href lang issues arise since the urls in the alternate tags are not identical to the ones with the hashtag since google bot turns a blind eye to everything beyond the hash tag. Solutions (without the use of modules please, I have plenty activated already) are welcome Link to comment Share on other sites More sharing options...
camylca Posted September 13, 2018 Share Posted September 13, 2018 Maybe it could help someone: I need to replace "#" in url with "?selected_filter=" (to make infinite scroll working with layered navigation), so I changed in blocklayered.php (presta 1.6.1.20) in line 2877 $type_filter['values'][$key]['link'] = $categorie_link.'#'.ltrim($parameters, '/'); to $type_filter['values'][$key]['link'] = $categorie_link.'?selected_filters='.ltrim($parameters, '/'); in line 3185: 'current_friendly_url' => ((int)$n == (int)$nb_products) ? '#/show-all': '#'.$filter_block['current_friendly_url'], to 'current_friendly_url' => ((int)$n == (int)$nb_products) ? '/show-all': '?selected_filters='.$filter_block['current_friendly_url'], Try to simply remove "#" from those lines Infinite scroll in block layered works fine for me now. Link to comment Share on other sites More sharing options...
RamboRich Posted September 14, 2018 Share Posted September 14, 2018 Hello, I would like to remove everything after and including the # hashtag from our urls on product pages with combinations. This is in Prestashop 1.7. Prestashop 1.6 doesn't seem to have this problem. For example, in 1.6, when a user clicks to a product (product page) with combinations the URL is like this: www.website.com/product-category/67-product.html However, and I need to fix this, on Prestashop 1.7 the URL is like so: www.website.com/product-category/67-product.html#/301-product-color This is when the user first comes to page. In PS 1.6 it just has www.website.com/product-category/67-product.html and then once the user picked a combination it would change to www.website.com/product-category/67-product.html#/301-product-color which is fine. When a user first comes to product page in 1.7 it automatically shows www.website.com/product-category/67-product.html#/301-product-color How can I get rid of the #/301-product-color when the page is first loaded up? I hope this makes sense. I have the feeling this is really hurting our SEO, as our shops in 1.6 seem to rank very well, however, in 1.7 everything that has a hashtag on the end seems to do poorly as far as SEO is concerned. Anybody that has any ideas please let me know! Thanks Link to comment Share on other sites More sharing options...
RamboRich Posted September 22, 2018 Share Posted September 22, 2018 Nobody? Link to comment Share on other sites More sharing options...
pedepot Posted September 29, 2018 Share Posted September 29, 2018 I would ask the same question as before. Why would you like to remove the anchor? Google can perfectly index them.... Link to comment Share on other sites More sharing options...
mir-aus Posted August 4, 2019 Share Posted August 4, 2019 I would like to remove it as well in PS1.7, I believe duplicate contents problem comes up. Link to comment Share on other sites More sharing options...
mir-aus Posted August 4, 2019 Share Posted August 4, 2019 in /override/classes/Link.php I change this and it's ok now. /** return $url . $dispatcher->createUrl('product_rule', $idLang, array_merge($params, $extraParams), $force_routes, $anchor, $idShop);*/ return $url . $dispatcher->createUrl('product_rule', $idLang, array_merge($params, $extraParams), $force_routes, $idShop); I'm currently testing it. if there is some news I'll write here. Link to comment Share on other sites More sharing options...
mir-aus Posted August 4, 2019 Share Posted August 4, 2019 I found this as well https://stackoverflow.com/questions/49531603/prestashop-1-7-remove-hash-1-size-4-from-url // $anchor = $ipa ? $product->getAnchor((int) $ipa, (bool) $addAnchor) : ''; // <-- Here is the change $anchor = ''; return $url . $dispatcher->createUrl('product_rule', $idLang, array_merge($params, $extraParams), $force_routes, $anchor, $idShop); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now