× Here you can get community support related to ReDJ.

help redirect

  • chris0879
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #3468 by chris0879
help redirect was created by chris0879
hi,
how to do redirect dinamic all url terminated with:
/related_product-xxxx.html
/related_product-xxx.html
/related_product-xx.html

example
from:
www.panaceaweb.it/prodotti-panacea/product/4769-ansiolev-45cpr/related_product-5534.html
to:
www.panaceaweb.it/prodotti-panacea/product/4769-ansiolev-45cpr.html

thanks.

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago - 9 years 10 months ago #3472 by admin
Replied by admin on topic help redirect
Hi,
try this:
From URL: /related_product-[0-9]*\.html$
To URL: {scheme}://{siteurl}{preg_match 1}/(\/prodotti-panacea\/.*)\/related_product-/{/preg_match}.html
Request only: true (checked)

Kind regards,
Luigi
Last edit: 9 years 10 months ago by admin.

Please Log in or Create an account to join the conversation.

  • chris0879
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #3474 by chris0879
Replied by chris0879 on topic help redirect
hi,
i am sorry, but not work!

thanks!
Attachments:

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #3475 by admin
Replied by admin on topic help redirect
Sorry,
I didn't realize you are using the Community version, while the preg_match macro is available only in the Enterprise version. So we should solve the problem using macros available in the Community. We must take the whole path:

/prodotti-panacea/product/4769-ansiolev-45cpr/related_product-5534.html

And remove only the last part so to leave:

/prodotti-panacea/product/4769-ansiolev-45cpr

Unfortunately this is dynamic, right? I mean, 4769-ansiolev-45cpr changes depending on the URL, or not?

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

  • chris0879
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #3476 by chris0879
Replied by chris0879 on topic help redirect
hi,
yes url is is dynamic!

this url changes based on Article
/prodotti-panacea/product/4769-ansiolev-45cpr

thanks!

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #3477 by admin
Replied by admin on topic help redirect
In this case is not possible to build the destination using available macros.

sorry

Please Log in or Create an account to join the conversation.

Time to create page: 0.219 seconds