Jump to content


This is public support for module to create seo url redirections 301, 302, 303. With this addon you can create unlimited number of redirections and it gives possibility to create regular expression and wildcard url redirect in PrestaShop. Addon has also many other options to hide empty categories, redirect non-existing products etc.
Photo

redirection 301 for specific url structure


  • Please log in to reply
1 reply to this topic

#1 Aziz

Aziz

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 30 August 2021 - 03:46 AM

Hi I try to make a redirection 301 with seo redirect, for http://www.URL/produit-*.html to http://www.URL/aa/bb/produit-*.html I try it with and without Regexp, with and without Wildcard, but it doesnt work. Do I have misunderstood something ? Regards



#2 Milosz

Milosz

    Advanced Member

  • Members
  • PipPipPip
  • 117 posts

Posted 30 August 2021 - 03:47 AM

Hello,
the wildcard/regexp redirection requires specific format used in "new url" and "old url" fields.

- wildcards option uses "shell wildcard" feature (known from unix based operational systems)

- regular expressions uses standard regular expression with all features behind (identify strings and get these strings to variables)

 

In your case you need to use regular expression since you want to use variable in "new url" (wildcard does not share variables, regexp does)

 

old url:

http\:\/\/www\.URL\/produit\-(.*)\.html

new url:
 

http://www.URL/aa/bb/produit-{1}.html





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users