Jump to content

regenerate friendly URLs


Recommended Posts

You do not need module to generate friendly url. It is built in prestashop. Just activate friendly url in 'URL & SEO' and generate your.htaccess file in 'generators'. Make sure your user running webserver has permission to write on your prestashop installation directory.

  • Like 1
Link to comment
Share on other sites

I was also wondering this as there seems to be an issue

 

It appears that for some of our products, clicking VIEW results in a 500 error

 

If I click Generate friendly URL, it regenerate the URL and all is then OK

 

However if i modify the product again in any other way (e.g stock update) i once again get the 500 error until I manually regenerate the URL

 

Only happens with some of the products though - very strange

Link to comment
Share on other sites

It's not normal that you have to generate .htaccess file every time you update your products. As .htacess file is just a bunch of regex expression defining how url should be transformed to the form php understands. And the rule is generic, it's not defined for every products. Since it's 500 error, i suspect it's problem with your php runtime. Can you exactly how does this error occurs or if it occurs just after certain type of operation?

Link to comment
Share on other sites

After more investigation, even though regenerating the file sorted out the issue,it seems that it is related to

 

Compress inline JavaScript in HTML

Compress inline JavaScript in HTML after "smarty compile" execution

Keep inline JavaScript in HTML as original

 

 

 

If I compress, then some products give that error

Link to comment
Share on other sites

  • 1 month later...

Hello guys!

 

I would like to accomplish this, because of a bug in 1.5.3.1: after upgrading to 1.5.3.1, I imported about 3000 products before I realized there was a new bug preventing the autogeneration of friendly urls with non-latin characters. For example, a product with the name:

 

SANSUN σετ ασύρματο πληκτρολόγιο-ποντίκι

 

gave the following auto-generated friendly URL rewrite part:

 

sansun-

 

instead of the proper:

 

sansun-σετ-ασύρματο-πληκτρολόγιο-ποντίκι

 

I applied this fix and this fix, which solved the problem. But the solution was not retroactive, meaning that I am left with thousands of problematic friendly URLs, making a one-by-one fix by hand totally impractical.

 

Is there a way to regenerate - recreate these friendly URLs? Perhaps with a custom PHP script, using functionality provided by PrestaShop's core? Your help and advice will be greatly appreciated!

Link to comment
Share on other sites

  • 1 year later...

There is actually a module which can uses product/category name instead of Friendly URL field at http://www.prestashop.com/forums/topic/315227-module-magic-seo-urls-for-prestashop-v14xx15xx-42/ so it runs perfect if it is empty or incorrect.

Nepřemyšlíte nad separací tyhle vlastnosti do modulu? Modul by byl čistě je na re-generaci nesprávných a prázdných SEO url...určitě bych měl zájem...nic podobného jsem zatím nenašel.

Link to comment
Share on other sites

Nepřemyšlíte nad separací tyhle vlastnosti do modulu? Modul by byl čistě je na re-generaci nesprávných a prázdných SEO url...určitě bych měl zájem...nic podobného jsem zatím nenašel.

Dobrý den, neplánujeme. Snažíme se poskytovat moduly, které pomáhají klientům dlouhodobě - vestavěné URLs PS jsou bohužel spíše katastrofou než pomocníkem. Nicméně vytvoření tohoto modulu by neměl být větší problém - určitě se najde spousta lidí co vám ho ráda vytvoří.
Link to comment
Share on other sites

Děkuji za odpověď, máte pravdu jedná se v podstatě o "jednorázové použití", poslední dotaz: když seženu tento modul a použiji ho budou mít s novou statickou URL vyhledávače potíže / nepříznivý dopad ? Pokud ne za jakou cenu by ste byli ochotní ho udělat nebo šlo by to přes SQL dotaz?

Link to comment
Share on other sites

  • 6 months later...
×
×
  • Create New...