Jump to content

[Override] Friendly Urls Without Id Number For V1.5


HA!*!*Y
 Share

Recommended Posts

 

Hello,

 

I'm testing wayann module from github with PS1.6.14, multishop

 

It works but not as it should works:

 

products and categories OK with SEO rules

products: {category:/}{rewrite}
categories: {parent_categories:/}{rewrite}/
 
Manufacturers
{rewrite} only works
manufacturers: {rewrite} doesn't (error 404)
 
Suppliers
{rewrite} doesn't (error 404)
manufacturers: {rewrite} doesn't (error 404)
 
CMS
{rewrite} only works 
info/{rewrite} doesn't (error 404)
 
You can see on http://wepiz.com

 

Make sure your seo and url settings are as follows:

This is MANDATORY

  • products: {category:/}{rewrite} (no .html at the end OBLIGATORY)
  • categories: {parent_categories:/}{rewrite}/
  • manufacturers: {rewrite}
  • CMS: "WHAT YOU WANT"/{rewrite} ex info/{rewrite}

Keep in mind to clear browser cache / PS cache under smarty/cache and smarty/compile

Share this post


Link to post
Share on other sites

Hi Sanders010 hm looks like the override isn't taking place have you trashed the class_index.php file in the cache folder?

I deleted /cache/class_index.php and emptied the cache in the backoffice.

 

ps: what override are you talking about? /modules/cleanurls/override/Link.php?

 

Thanks

Edited by Sanders010 (see edit history)

Share this post


Link to post
Share on other sites

I deleted /cache/class_index.php and emptied the cache in the backoffice.

 

ps: what override are you talking about? /modules/cleanurls/override/Link.php?

 

Thanks

 

I was thinking the Dispatcher.php, I remember I had the same issue, but I can't recall after what I had that issue and what fixed it... 

 

most probably some wrong setting on the rewrite url

 

sorry my memory is getting old.... 

Edited by wayann (see edit history)

Share this post


Link to post
Share on other sites

I was thinking the Dispatcher.php, I remember I had the same issue, but I can't recall after what I had that issue and what fixed it... 

 

most probably some wrong setting on the rewrite url

 

sorry my memory is getting old.... 

 

 

Thanks for answering.

 

/modules/cleanurls/override/classes/Dispatcher.php doesn't seem to be used. So I guess the override is not working. Any ideas? 

Share this post


Link to post
Share on other sites

Sanders010 are you sure?

 

activate prestashop debug

 

and try place this code in to the Dispatcher.php override

die( var_dump ("Override Working") ); 

if you see a blank page with "Override Working" then override is working

  • Like 1

Share this post


Link to post
Share on other sites

Sanders010 are you sure?

 

activate prestashop debug

 

and try place this code in to the Dispatcher.php override

die( var_dump ("Override Working") ); 

if you see a blank page with "Override Working" then override is working

 

 

I enabled debug in defines.inc.php

define('_PS_MODE_DEV_', true);

And placed the die at the top of /modules/cleanurls/override/classes/Dispatcher.php (I tried it earlier with an exit()

<?php

die( var_dump ("Override Working") ); 
class Dispatcher extends DispatcherCore
{
/**
* @var array List of default routes
*/

 

 

 

I don't see the die message, but I do see another message;

Strict Standards: Declaration of Link::getCategoryLink() should be compatible with that of LinkCore::getCategoryLink() in /override/classes/Link.php on line 126

I still see the regular 404 page loaded beneath this message.

Edited by Sanders010 (see edit history)

Share this post


Link to post
Share on other sites

that warning message is because you're using the latest ps version and a function that is overridden in Link.php might have changed, you should strip off your server path from your post for security reason.

 

but that message indicates that override are taking place since Link.php is installed by cleanurl...

 

in case you still want to check if Dispatcher.php is indeed overriding:

 

cleanurl install the overrides in the override folder of prestashop it's located at the root of your prestashop 

/override/classes/Dispatcher.php

place the die call inside the class

<?php

class Dispatcher extends DispatcherCore
{
die( var_dump ("Override Working") ); 
/**
* @var array List of default routes
*/
  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the security tip, didn't realise I posted it.

 

I allready tried putting the die() inside the class, also in the function isProductLink(). I don't see the die(). It's not being used for sure. When I put an exit() inside the original Dispatcher.php I do see the script execution is being ended and don't get a 404.

 

So how do the overrides work and do you know what the problem is now maybe?

 

Thanks alot for your help.

Share this post


Link to post
Share on other sites

Hello!

 

Prestashop 1.6 + module Clean URLs v0.42.1 - by ha!*!*y. The addresses with content_only variable (eg /burgers/gamburger?content_only=1) shows a 404 error.

 

Help solve this problem.

Share this post


Link to post
Share on other sites

Sanders010, each time you change something in the override folder you should trash in the cache folder the class_index.php file as well, you have the smarty prefs set to force compile right? the override should be working...

 

if it's not working pm me with a guest access to your server, and I'll look in to it

Share this post


Link to post
Share on other sites

Make sure your seo and url settings are as follows:

This is MANDATORY

  • products: {category:/}{rewrite} (no .html at the end OBLIGATORY)
  • categories: {parent_categories:/}{rewrite}/
  • manufacturers: {rewrite}
  • CMS: "WHAT YOU WANT"/{rewrite} ex info/{rewrite}

Keep in mind to clear browser cache / PS cache under smarty/cache and smarty/compile

 

 

Thanks for answer but I'm not sure you've read my post

 

I've no cache enabled

I did seo settings like you said

Result is ok for products and category, but not with manufacturers, suppliers and cms.

I've checked all files, it seems to be ok, cleared class_index

 

I can use it but it not works as it should be for me. However it's great job, thanks !

 

 

I've no problem with quick view in fancy pop up, working fine for me with the module

Edited by jolvil (see edit history)

Share this post


Link to post
Share on other sites

HI,

 

I just want to activate this feature only for cms page. Is there anything on the code I can edit so that The redirection can only happen for cms page and nothing else.

Yes you can, you need to edit the overrides Dispatcher.php, Link.php, but frankly speaking if I was you, I would stick to prestashop default friendly url, that will save you a daunting task.

  • Like 2

Share this post


Link to post
Share on other sites

Thanks for the reply. I know but as the SEO and URLs are like that so I have to do it. I have tried all the stuff. Module works the way I want but some category pages are not loading. So I think the best Idea is to keep the feature active only for CMS page.

Share this post


Link to post
Share on other sites

Sanders010, each time you change something in the override folder you should trash in the cache folder the class_index.php file as well, you have the smarty prefs set to force compile right? the override should be working...

 

if it's not working pm me with a guest access to your server, and I'll look in to it

 

Hi wayann,

 

I've emptied the cache and removed the class_index.php after changing the override, but I still get a 404 on url's with $_GET content_only=1. The override is not working.

I've send you a pm with a ftp account, admin login and htaccess login so you can look for yourself. I see more people are having this issue so it would be great if we could get it solved.

 

Thanks

 

Share this post


Link to post
Share on other sites

Now my requirement is to keep all the urls and rules as they are but to change the cms page only. Can you shed some lights on it ?

 

you will need to remove all routes that are not related to the cms route on the Dispacther.php,

 

good luck

Share this post


Link to post
Share on other sites

Hi,

 

I installed the module on PS 1.6.0.9 and everything works fine except the Search images and prices are not working and are displaying 'undefined' instead i.e.

 

<img class="img-responsive" src="undefined">

 

Any help would be appreciated.

 

Thanks,

Mick

Share this post


Link to post
Share on other sites

  • 2 weeks later...

@ wayann: First of all, thank you for the module! Works like a charm.

 

I have a working 1.6.013 installation with your latest GIT and everything works like expected.

 

Now i have installed the smartblog module (version 2.0.1) and tried to do the changes you mentioned earlier in this thread.

I can't seem to get it working tho :(

Blog category links are not rewritten and when i try to display a blog post (from home -> latest news), content is not displayed and i get following notice in logs:

 

PHP Notice:  Undefined index: slug in /var/www/mydomain.com/web/modules/smartblog/controllers/front/details.php on line 18" while reading response header from upstream,
client: 127.0.0.1, server: www.mydomain.com,

referrer: "https://www.mydomain.com/blog/"
 

Sorry for the format some reason the code tag does not work when i post :(

(i replaced the domain by mydomain.com)

 

Any idea what could be wrong or what could i check ?

Edited by lmikula (see edit history)

Share this post


Link to post
Share on other sites

@ wayann: First of all, thank you for the module! Works like a charm.

 

I have a working 1.6.013 installation with your latest GIT and everything works like expected.

 

Now i have installed the smartblog module (version 2.0.1) and tried to do the changes you mentioned earlier in this thread.

I can't seem to get it working tho :(

Blog category links are not rewritten and when i try to display a blog post (from home -> latest news), content is not displayed and i get following notice in logs:

 

PHP Notice:  Undefined index: slug in /var/www/mydomain.com/web/modules/smartblog/controllers/front/details.php on line 18" while reading response header from upstream,

client: 127.0.0.1, server: www.mydomain.com,

referrer: "https://www.mydomain.com/blog/"

 

Sorry for the format some reason the code tag does not work when i post :(

(i replaced the domain by mydomain.com)

 

Any idea what could be wrong or what could i check ?

Hi Imikula, that error means that the variable "slug" is not defined.

Check in details.php and in overrides > Dispatcher.php you should have it defined in one of these files if you followed the instructions

Share this post


Link to post
Share on other sites

Hi Imikula, that error means that the variable "slug" is not defined.

Check in details.php and in overrides > Dispatcher.php you should have it defined in one of these files if you followed the instructions

 

Hmm well it's not there, but more likely it's the missing "slug" GET parameter .. no idea where it is set tho ...

 

I copy pasted the two files into smartblog and installed latest git (it already contains the changes from that zip file attached to your comment right?)

Share this post


Link to post
Share on other sites

Hmm well it's not there, but more likely it's the missing "slug" GET parameter .. no idea where it is set tho ...

 

I copy pasted the two files into smartblog and installed latest git (it already contains the changes from that zip file attached to your comment right?)

        'smartblog_category_rule' => array(
            'controller' => 'category',
            'rule' =>        'blog/motif/{category}',
            'keywords' => array(
                'id_category' =>    array('regexp' => '[_a-zA-Z0-9-\pL]*', 'param' => 'id_category'),
                'category'       =>   array('regexp' => '[_a-zA-Z0-9-\pL]*', 'param' => 'category'),
            ),
            'params' => array(
                'fc' => 'module',
                'module' => 'smartblog',
            ),
        ),

There's a few assumptions to have it working, blog should be http://www.yourdomain.com/blog/

category are by default called "motif" but that you can change in Dispatcher.php on the above snippet code...

 

slug is defined in details.php

	public function getPostVars($id_post, $slug)

hope it helps

Share this post


Link to post
Share on other sites

Both changes you mention are there in place. I must be missing something.

 

This works:
 

https://www.mydomain.com/blog/

 - displays  topics, however links to categories are created like this:

https://www.mydomain.com/blog/category/1_zaujimavosti 

but this link does not work.

When i enter this URL:

https://www.mydomain.com/blog/motif/zaujimavosti

it works, so it seems it is correctly rewritten.
Blog post links are created like this:

https://www.mydomain.com/blog/5_vanilka-vs-vanilin

and do not display the body of the post. I have tried several URLs to get it to display the posts body, but was not able ...
 

Edited by lmikula (see edit history)

Share this post


Link to post
Share on other sites

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

Has anyone figured out how to disable removing id for product? (To prevent dupilicates)

 

E.g.

www.domain.com/category/product-1

 

instead of

www.domain.com/category/product

Share this post


Link to post
Share on other sites

Maria, remove ".html" from "ruta a las paginas CMS". It should just be "paginas/{rewrite}" or "{rewrite}" or "whateveryouwant/{rewrite}".

 

The resulting page will not have a ".html" in the end.  

 

If you REALLY want to make the ".html" version accessible, you can just redirect "yourpage.html" to "yourpage" via setting a 301 redirect on .htaccess.  

 

In your case, adding this to your .htaccess should work

 

RewriteEngine on
RewriteRule ^/paginas/terminos-y-condiciones-de-uso\.html$  /paginas/terminos-y-condiciones-de-uso [R=301,L,NC]

Share this post


Link to post
Share on other sites

1.5.6 prestashop use.

I have a problem with the module CleanURL 0.42 webmaster tool that tells me I have duplicate URLs.

 

 



/en/brassware/axor-massaud-tap-taps-sink-pipe-high-18020000.htmlurl_icon.png



/en/brassware/axor-massaud-tap-taps-sink-pipe-high-18020000.html?product_rewrite=27-ibox-universal-basic-seturl_icon.png

 



 

 

 

 

I wonder if you found a solution to?

 

Can you help me?

Share this post


Link to post
Share on other sites

@wayann

I encounter weird behaviour with Automatically redirect to the Canonical URL

V5IeBy1.jpg

When OFF, sub-category menu in left column linked to site.com/sub-cat

When clicked, it goes to site.com/sub-cat

 

When ON, sub-category menu in left column linked to site.com/sub-cat

But when its clicked, it diverted to site.com/main-cat/sub-cat

So the breadcrumb is also not correct (diverted)

 

So, what is the correct setting for Automatically redirect to the Canonical URL?

is it best to set ON? If it's ON, then how the sub-cat menu in left column is linked to correct URL? No need for diverting?

Share this post


Link to post
Share on other sites

I installed fresh copy 1.5.6.2 locally, all version (lebioda, awcode, zizuu, wayann) has NO PROBLEM on best-sales, prices-drop, new-products, and sitemap.

 

But when I install my copy of online site into locally, those links won't work (EDIT: It's HDD fault).

LYgg0hL.jpg

 

F4BfoY9.jpg

 

EDIT : I found out it was my fault. I un-zipped again my copy of online store into locally, this problem does not occur again. So I think it's related to HDD.

Edited by kyrios (see edit history)

Share this post


Link to post
Share on other sites

@wayann

I encounter weird behaviour with Automatically redirect to the Canonical URL

V5IeBy1.jpg

When OFF, sub-category menu in left column linked to site.com/sub-cat

When clicked, it goes to site.com/sub-cat

 

When ON, sub-category menu in left column linked to site.com/sub-cat

But when its clicked, it diverted to site.com/main-cat/sub-cat

So the breadcrumb is also not correct (diverted)

 

So, what is the correct setting for Automatically redirect to the Canonical URL?

is it best to set ON? If it's ON, then how the sub-cat menu in left column is linked to correct URL? No need for diverting?

I found out, the problem is lied in override/classes/link.php

 

if ($dispatcher->hasKeyword('category_rule', $id_lang, 'parent_categories'))
{
//RETRIEVING ALL THE PARENT CATEGORIES
$cats = array();
foreach ($category->getParentsCategories($id_lang) as $cat)
{
self::$category_disable_rewrite[] = $category->id;
// remove root and current category from the URL
if (!in_array($cat['id_category'], self::$category_disable_rewrite)) {
$cats[] = $cat['link_rewrite']; //THE CATEGORIES ARE BEING ASSIGNED IN THE WRONG ORDER (?)
}
}
$params['parent_categories'] = implode('/', array_reverse($cats)); //ADD THE URL SLASHES TO THE CATEGORIES IN REVERSE ORDER
}

Share this post


Link to post
Share on other sites

I replace the ocde from lebioda code

 

if ($dispatcher->hasKeyword('category_rule', $id_lang, 'parent_categories'))
{
//RETRIEVING ALL THE PARENT CATEGORIES
$cats = array();
foreach ($category->getParentsCategories($id_lang) as $cat)
if (!in_array($cat['id_category'], array(1, 2, $category->id)))//remove root, home and current category from the URL
$cats[] = $cat['link_rewrite']; //THE CATEGORIES ARE BEING ASSIGNED IN THE WRONG ORDER (?)
$params['parent_categories'] = implode('/', array_reverse($cats));//ADD THE URL SLASHES TO THE CATEGORIES IN REVERSE ORDER
}

Share this post


Link to post
Share on other sites

Hi,   my presta installation is 1.6.0.14

I uploaded the module

i install it

And ......BLANK SCREEN EVERYWHERE !!!

I can't go to  BO and my website also.

I turn on error reports and i get this :

Parse error: syntax error, unexpected '{', expecting T_FUNCTION in /var/www/vhosts/mysite.com/httpdocs/home/override/classes/Link.php on line 4

 

I delete the module via Filezilla but didn't help

I uploaded again

 

I delete the Link.php 

and delete the    .html from {category:/}{rewrite}.html

 

It's ok for now

Edited by Athinodoros (see edit history)

Share this post


Link to post
Share on other sites

Hi,


My prestashop installation is 1.6.0.14.


I install this module this morning,everything work fine but CMS category page.I got a 404 error.


 


My config is like this:


Route to CMS page : info/{rewrite}


Route to CMS category: info/{rewrite}/


 


please help me


Share this post


Link to post
Share on other sites

Here its how it works for me.

 

Route to product: {category:/}{rewrite}

 

Route to category: {parent_categories:/}{rewrite}/

 

Route to category which has the "selected_filter: {rewrite}/filter{selected_filters}

 

Route to supplier: supplier/{rewrite}/

 

Route to manufacturer: manufacturer/{rewrite}/

 

Route to CMS page: content/{rewrite}

 

Route to CMS category: content-category/{rewrite}

 

Route to modules: module/{module}{/:controller}

 

 

Delete class_index.php file from path public_html/cache/class_index.php

 

 

Hope this will help. If it works for you mark it as solved.

  • Like 1

Share this post


Link to post
Share on other sites

Hi to everybody!

I've tried this module on my 1.6.0.14 presta.

I've used this module https://github.com/wayann/PrestaShop-modules-CleanURLs

But I have 5 errors:

  1. Keyword "{id}" required for route "product_rule" (rule: "{category:/}{rewrite}")
  2. Keyword "{id}" required for route "category_rule" (rule: "{parent_categories:/}{rewrite}/")
  3. Keyword "{id}" required for route "layered_rule" (rule: "{rewrite}/filter{selected_filters}")
  4. Keyword "{id}" required for route "manufacturer_rule" (rule: "{rewrite}")
  5. Keyword "{id}" required for route "cms_category_rule" (rule: "info/{rewrite}")

Can anybody help me with this issue? What is wrong?

Thanks in advance!

Share this post


Link to post
Share on other sites

Hi,   my presta installation is 1.6.0.14

I uploaded the module

i install it

And ......BLANK SCREEN EVERYWHERE !!!

I can't go to  BO and my website also.

I turn on error reports and i get this :

Parse error: syntax error, unexpected '{', expecting T_FUNCTION in /var/www/vhosts/mysite.com/httpdocs/home/override/classes/Link.php on line 4

 

I delete the module via Filezilla but didn't help

I uploaded again

 

I delete the Link.php 

and delete the    .html from {category:/}{rewrite}.html

 

It's ok for now

 

Hi Athinodoros, 

 

did you find a solution for this? I'm getting the same error, backend and frontend.

As soon as I remove dispatcher.php from overrides, no errors - but obviously no clean url either.

 

I'm on 1.6.0.9

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Hello, I have seen three people in the last 3 weeks or so with the same problem as I have(complete blank pages on both front and back end after install) and no one has addressed this problem.

 

Can someone please tell us how to fix this?

 

Prestashop 1.6014 and the latest module from github.

 

Thanks in advance,

Jeff

Share this post


Link to post
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
vickthikor raises a real problem.

Indeed, the module works but I used the SeeUrank analysis software.


 


 

I do not know how it find the page, but it is active, and if Google find it too is catastrophic for SEO ...

 

All users of the module have the problem I think. Also does anyone found a solution?

Edited by guil182 (see edit history)

Share this post


Link to post
Share on other sites

vickthikor raises a real problem.

Indeed, the module works but I used the SeeUrank analysis software.

It find the url: http://www.millesime-online.com/fr/chateau-gloria-1996-cbo12.html

 

But also the url : http://www.millesime-online.com/fr/chateau-gloria-1996-cbo12.html?product_rewrite=chateau-gloria-1996-owc12

 

I do not know how it find the page, but it is active, and if Google find it too is catastrophic for SEO ...

 

All users of the module have the problem I think. Also does anyone found a solution?

You have to block in webmaster tools from Google the parameter ?product_rewrite (see the attachment)

 

post-663000-0-49063200-1439295382_thumb.jpg

 

It occurs because this

 

Old

Www.a.com/food/231-chicken

 

New

Www.a.com/food/chicken

 

The problem is to call

Www.a.com/chicken

 

It will produce a product_rewrite with the name of the category.

 

When you have the number you can rename the articles and the redirect is automatic. But without it you have to take care. Some Google saved url can call the old directions like only chicken. You can only block in webmaster tools

 

And with this module you can NEVER have two articles with the same name in different categories. There is not a number to identify it

 

The module could be improved without having that error with the rewrite.

Edited by maximo88 (see edit history)

Share this post


Link to post
Share on other sites

Hi everyone,

 

I have instaled at my prestashop module version cleanurls_0.42 and after that my shop stop working :|

I have deleted module from FTP and is the same - white page, nothing more, i have turned on debug mode, but dont showing anything..

 

Can some one can help ?

www.vparfumerie.de

 

Thank you!

Share this post


Link to post
Share on other sites

  • 2 weeks later...
Hi HA!*!*Y & all my friends here

 

My name is Adi and I need you help.

 

I have been using the module cleanurl in prestashop 1.6 and it works well .

 

But I mistakenly delete a module , and modules that I was wrong to delete is cleanurl .

 

And now I can not access my website and backoffice (blank page). What should I do?

Please help me .... thanks before.

Share this post


Link to post
Share on other sites

I have a problem with this module, I installed it on the 1.6.1.0 version of prestashop, the installation goes well, but when I try to change de friendly urls to the ones without the id, the backoffice still says that the id is required. I have no duplicated urls and I have tried to disable/enable friendly urls. But still nothing happens.

Any ideas?

Share this post


Link to post
Share on other sites

I have a problem with this module, I installed it on the 1.6.1.0 version of prestashop, the installation goes well, but when I try to change de friendly urls to the ones without the id, the backoffice still says that the id is required. I have no duplicated urls and I have tried to disable/enable friendly urls. But still nothing happens.

Any ideas?

 

I have same error in PS 1.6.1.1. When modify url in SEO + URLs from backoffice it says:

 

7 errors 

  1. Keyword "{id}" required for route "product_rule" (rule: "{category:/}{rewrite}")
  2. Keyword "{id}" required for route "category_rule" (rule: "{parent_categories:/}{rewrite}/")
  3. Keyword "{id}" required for route "layered_rule" (rule: "{rewrite}{/:selected_filters}")
  4. Keyword "{id}" required for route "supplier_rule" (rule: "__{rewrite}")
  5. Keyword "{id}" required for route "manufacturer_rule" (rule: "{rewrite}")
  6. Keyword "{id}" required for route "cms_rule" (rule: "info/{rewrite}")
  7. Keyword "{id}" required for route "cms_category_rule" (rule: "info/category/{rewrite}")

 

I dont know why Prestashop dont allow in last versions delete id from urls. This is shit for seo... I believe that is necessary change some file from core to allow urls without ids
 
Some solution?
 
Best regards
 
 
 
---------------------------
EDIT: the file to modify seem is in controllers/AdminMetaController.php
 
If I found some solution I will post there
BR
Edited by seog (see edit history)

Share this post


Link to post
Share on other sites

Hello

 

I'm having problems in the module "Cleanurl_v0.42" for prestashop 1.5.6.2 and as I indicated I Webmaster Tool This module is generating duplicate content. I direción doubles url of a product. I mean that of a product are two URL addresses off example:

 


 


 

 

 

the two are the same product but the former generates me "? product_rewrite = a ......"

 

 

Is there any way to fix this?

 

What should I do ? you advise me to re-addresses 310.

 

They have also spoken of "modrewrite" but not how to write the .htaccess

 

 

 

I hope some help

  • Like 1

Share this post


Link to post
Share on other sites

Hello guill82 and maximo88 

 

Podrías explicar que pasos tienes que dar para que webmaster tool no te duplique contenido ??

 

 

You have to block in webmaster tools from Google the parameter ?product_rewrite (see the attachment)

attachicon.gifimage.jpg

It occurs because this

Old
Www.a.com/food/231-chicken

New
Www.a.com/food/chicken

The problem is to call
Www.a.com/chicken

It will produce a product_rewrite with the name of the category.

When you have the number you can rename the articles and the redirect is automatic. But without it you have to take care. Some Google saved url can call the old directions like only chicken. You can only block in webmaster tools

And with this module you can NEVER have two articles with the same name in different categories. There is not a number to identify it

The module could be improved without having that error with the rewrite.

 

Hello guill82 and maximo88 

 

Podrías explicar un poco mejor que pasos tienes que dar para que webmaster tool no te duplique contenido ??

Ando muy perdido en este tema, gracias. 

 

-------------------------------------------------------

 
Could you explain a little better what steps have to give webmaster tool that you do not duplicate content ??
I'm very lost on this issue, thanks.

Share this post


Link to post
Share on other sites

Hola Maximo88,

 

Si, vi la imagen que añadiste de webmaster tool en el otro post, pero no sabia interpretar la imagen por eso mi confusión, ahora intentare hacer lo que me dices, haber si al menos funciona.

 

Pienso que si webmaster o google en general, si no rastrea las paginas reescritas, que es el caso que sucede con este modulo, supongo que este no las indexara ¿ no ? . si no las tiene en cuenta no tiene por que aparecer en su buscador ? 

¿Que resultados te esta dando a tí?

 

 

Por otro lado he intentado hacer re-direcciones 310 en el archivo  .htaccess para arreglar el problema, pero este tipo de re-dirección 310 no valen para las URL duplicadas,(Las URL las que siguen con el "? product_rewrite = a..")

a lo que me han informado un trabajador del hosting que tengo contratado, que este tipo de url duplicadas solo se puede re-direccionar con mod_rewrite en el archivo .htaccess que son re-direcciones pero un poco mas complejas con mas de una linea. me dijo que mirara este link

 

 

mod_rewrite aquí: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html 

 

el problema es que no se como hacerlo.

 

 

 

-------------------------------------------------------------------------

 

Hello Maximo88,

 
Yes, I saw the image of webmaster tool you added in another post, but could not read the image so my confusion, now try to do what you tell me, if you have at least works.
 
I think if google webmaster or in general, if not traces the rewritten pages, it is the case that happens with this module, I guess to indexes that not right? . if not take into account the need not appear in your browser?
What results you is giving you?
 
 
 
On the other hand I tried to re-address 310 in the .htaccess file to fix the problem, but this type of redirection are not worth 310 duplicate URLs (URLs that follow the "? Product_rewrite = a .. ")
what I have been informed that a worker have hired hosting, this type of duplicate URLs only be redirecting with mod_rewrite in the .htaccess file are re-directions but a little more complex with more than one line. He told me to look this link
 
 
 
the problem is not how.
  • Like 1

Share this post


Link to post
Share on other sites

Ok I've it working now 100%!
 
My experience:
Prestashop 1.6.1.1 (Last version)
Working in remote server (develop copy of my site)
 
At first I tried with the module by Lebioda https://github.com/Lebioda/PrestaShop-modules-CleanURLs
It works but url with parameters not work, example

http://myshop.com/somecategory/?orderby=price&orderway=asc

same problem with pagination and other features.
 
Then I remove this module, make sure to delete de overrides and disable/enable friendly urls.
 
Install the version by Wayann https://github.com/wayann/PrestaShop-modules-CleanURLs
and url with parameters works well (solution for Maria Gonzalez), and in first impression I didn't found any problem.
 
My rewrites config is:
 
Products: {rewrite}
Categories: {rewrite}
category with filters: {rewrite}/filter/{selected_filter}  (I'm not need this so I didn't changed it)
Suppliers: {rewrite}
Manufacturers: {rewrite}
CMS: {rewrite}
CMS category: {rewrite} (NOT SUPPORTED by the module, and I can work without it)
Modules: module/{module}{/:controller} (Didn't changed)
 
I choose to change it all to {rewrite} because my products need long url and I can put different keywords variations in similar products to catch more searchs, example:
 
Product URL With category: 

http://myshop.com/sliding-door-motors/motor-model
http://myshop.com/sliding-door-motors/other-motor-model

(I can only have "sliding door motors" keyword)
 
Product URL Without category:

http://myshop.com/motor-for-sliding-door-motor-model
http://myshop.com/automatic-system-for-sliding-door-model

(I can have differents keywords in the url, in my case I no need category tree in the url)
I put my keywords in the url looking for most searched keywords and put in the best seller product for this category, second most searched with second most selled product...
 
LAST IMPORTANT THING FOR SEO:
In my case I have my entire shop indexed by google, so I need to redirect old links to new structure, to do this I maked some RewriteRules in my .htaccess I don't know if it's the best way to do it but for me is working, add it before the # ~~start~~


 

#MOD FOR REDIRECT OLD URL TO NEW
Options +FollowSymLinks
RewriteEngine On

#MANUFACTURER
RewriteRule ^\d+_(.+)$ ./$1 [R=301,L]

#CMS CATEGORY
RewriteRule ^content/category/(\d+)-.+/$ ./index.php?id_cms_category=$1&controller=cms [R=301,L]

#CMS
RewriteRule ^content/(\d+)-.+$ ./index.php?id_cms=$1&controller=cms [R=301,L]

#PRODUCT
RewriteRule ^.+/(\d+).+\.html$ ./index.php?id_product=$1&controller=product [R=301,L]

#CATEGORy
RewriteRule ^(\d+)-.+([^.jpg])$ ./index.php?id_category=$1&controller=category [R=301,L]

#END OF MOD FOR REDIRECT OLD URL TO NEW

Any improve are welcome, thanks to Lebioda and Wayann!

PD: Sorry for my english.

Edited by Sundbox (see edit history)
  • Like 2

Share this post


Link to post
Share on other sites

Hola Maximo88,

 

 

I think if google webmaster or in general, if not traces the rewritten pages, it is the case that happens with this module, I guess to indexes that not right? . if not take into account the need not appear in your browser?

What results you is giving you?

 

 

On the other hand I tried to re-address 310 in the .htaccess file to fix the problem, but this type of redirection are not worth 310 duplicate URLs (URLs that follow the "? Product_rewrite = a .. ")

what I have been informed that a worker have hired hosting, this type of duplicate URLs only be redirecting with mod_rewrite in the .htaccess file are re-directions but a little more complex with more than one line. He told me to look this link

 

 

1) It works. Trust it. I was on google with 13.000 URL, now I am in 7000 with 55000 products. It is slow, but it works. Two months...

 

2) The perfect solution will be to rewrite the evil "?product_rewrite". I learnt a lot of htaccess rules, but I never got the solution for that. It didn't work. Could be that I was very tired that afternoon. 7 hours to understand Redirect Rules 301 Expressions. Some day we will find the solution, while don't worry about that. It is not the most important for SEO

Share this post


Link to post
Share on other sites

Hi

i want a simple mod for friendly URL
one-click to generate breadcrumb structure as friendly URL removing id and generate weekly sitemap.xml

eg: my breadcrumb is

> Zovi Shop>Men>Mens Tees>Banana Cream Yellow Solid Henley T-shirt
 
i want URL to be
 
mydomain.com/Zovi Shop/Men/Mens Tees/Banana Cream Yellow Solid Henley T-shirt.html
 
 
 
x0sjfp.jpg

Share this post


Link to post
Share on other sites

Hi. I install cleanurls v0.4.2 and I have a problem.
Show only white screen and error is : Parse error: syntax error, unexpected ''supplier_rule'' (T_CONSTANT_ENCAPSED_STRING), expecting function (T_FUNCTION) in /home/paf/paffashion.sk/override/classes/Dispatcher.php on line 4

What is the problem? Please help me..

Share this post


Link to post
Share on other sites

Anyone having the same issue when google crawls the site: Standard prestashop url extension for category pagination was mysite/category?p=2

Now with clean urls, it is www.mysite/categor#/page-2 , but google (and all crawling software i have tried so far) is still crawling the old format of ?p=2. How and where can i change this? 

Share this post


Link to post
Share on other sites

Anyone having the same issue when google crawls the site: Standard prestashop url extension for category pagination was mysite/category?p=2

Now with clean urls, it is www.mysite/categor#/page-2 , but google (and all crawling software i have tried so far) is still crawling the old format of ?p=2. How and where can i change this? 

 

 

Am i realy the only one with this issue? 

  • Like 1

Share this post


Link to post
Share on other sites

Buf... a lot of words for nothing =)

En general, id in url is not give you eny advantage in seo, now its not that important likle before!

 

And here is more! If url contain simbols ? or & old style, but if page content its very good, it will be in top 10!

 

----------------

 

buff... tanto rollo para nada =)

En general para seo el id en url no molesta ni da ningun beneficio

El seo no es como antes ahora no es tan importante

 

Les digo mas! an que url sea con rollo de ? y & si el contenido de la pagina es bueno estara en top 10!

Share this post


Link to post
Share on other sites