Jump to content

Modules-blocklayered of SEO unfriendly URL solution: [pjax-pushState-ajax]

Recommended Posts


The URL above will redirect to (301?)



In the URL above is the blocklayered module
the URL for SEO is not that friendly
  1. Add redirect
  2. symbol #


But already plan to resolve the problem in the industry:

pjax = pushState + ajax




Github.com also use pajax technology!!!


Achieve your goals

  1. Jump page (forward backward, clicks, etc) not to request the page
  2. URL of the page with a page that displays content (in accordance with people's understanding of the traditional Web)
  3. In browsers that do not support the falling level of the traditional Web page


Hope that official PrestaShop team will use a technology completely solve the ugly and does not meet the standards of SEO URL problem!
URL changed, but there is no page refresh!
  • 1.URL SEO friendly!
  • 2. user experience perfectly!
  • 3. save traffic, site respond quickly!
  • 4. for browsers that do not support this feature, automatically switches to the original feature good compatibility!
I wish you the best of luck!
  1. https://github.com/defunkt/jquery-pjax
  2. http://html5doctor.com/history-api/
  3. http://www.ruanyifeng.com/blog/2013/07/how_to_make_search_engines_find_ajax_content.html
  4. http://www.cnblogs.com/flash3d/archive/2013/10/23/3384823.html
Edited by alicebob (see edit history)

Share this post

Link to post
Share on other sites

  • 2 weeks later...
  • 2 months later...

I think this should be done somehow.

That hashtag is not necessary at all in blocklayered, but it prevents google from indexing filtered pages.

I was looking for solution some time ago, but found nothing.

Share this post

Link to post
Share on other sites

  • 6 months later...

Hello everybody,

the post is a bit old, but I would like to know if somebody found a solution to this problem?


I would like "real" (direct) url for the filters (without #), in order that these pages could be indexed by google, and that I could do links from others pages to the color pages for example...


I hope that someone can help me, because I think it's an important issue for SEO.


Thank you

Edited by SophieB (see edit history)

Share this post

Link to post
Share on other sites

  • 3 months later...

Hello! i have some quick guide for all, also i can do this as payment job if you need:

First you need inside file blocklayered.php change all hash '#' symbols on 'filter'
After you need inside file blocklayered change all hash "#" symbols on 'filter'


It is important, change the hash '#' only in those places that according to the link, since this symbol '#' may be responsible also for other things, such as an indication of the ID of element in the code.
After in file blocklayered in reloadContent() function you need find line with this code:


window.location.href = current_friendly_url;

And change on this code:


var url = window.location.href;
if(url.indexOf('filter') === -1){

} else {
   url = url.substr(0, url.indexOf('filter'));

window.history.replaceState(null, null, url + current_friendly_url);
Best regards,

Share this post

Link to post
Share on other sites

  • 1 year later...



 $type_filter['values'][$key]['link'] = $categorie_link........................


Replace this formule:

                    // Check if there is an non indexable attribute or feature in the url
                    foreach ($non_indexable as $value)
                        if (strpos($parameters, '/'.$value) !== false)
                            $nofollow = true;
                    if (!empty($parameters))
                        $type_filter['values'][$key]['link'] = $categorie_link.'?selected_filters='.ltrim($parameters, '/');

                        $filter_name = $_GET['selected_filters'];
                        $type_filter['values'][$key]['link'] = $categorie_link.'?selected_filters='.ltrim($parameters, '/').''.$filter_name.'#';

                    $type_filter['values'][$key]['rel'] = ($nofollow) ? 'nofollow' : '';


Very simple and primitive but it works PrestaShop



Edited by adrian99 (see edit history)

Share this post

Link to post
Share on other sites

  • 1 month later...

Hello adrian99 but I do the change and dont work for me. I use the same version.

Efectivily you generate the correct url for example:->https://www.tabletspc.es/adaptadores-de-cable/?selected_filters=fabricante-assmann_electronic  -> but when you click on it get ..../adaptadores-de-cable/#/fabricante-assmann_electronic.

What I have without do ?


Edited by JorgeCeuta (see edit history)

Share this post

Link to post
Share on other sites

On 2/5/2016 at 4:30 PM, Kerm said:

¡Hola! tener alguna rápida I Guías para todos, también puedo hacer el este pago al igual que con el trabajo del si hasta Necesidad:

En primer seguimiento que necesite archivo dentro blocklayered.php cambiar símbolos todos de hash '#' en el 'filtro'
de Después de presentar el interior hasta cambio de la necesidad blocklayered todo almohadilla "# "símbolos en 'filtro'


Es importante, cambie el hash '#' solo en los lugares que de acuerdo con el enlace, ya que este símbolo '#' puede ser responsable también de otras cosas, como una indicación de la ID del elemento en el código.
Después en el archivo blocklayered en la función reloadContent (), necesita encontrar la línea con este código:


Y cambie en este código:




Saludos cordiales,



I'm try this solution and I work for me . The problem it's when you close the filter don't back to the category url. For example you click on filter and work and redirect to gategrory_url/filter, but when you close the filter work as well but you don't redirect to category_url you stay in the same category_url/filter.

Anay sugestion ?

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More