× Here you can get community support related to ReDJ.

redirect with a part of url !

  • strouve181
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #4789 by strouve181
Replied by strouve181 on topic redirect with a part of url !
Hello,

Thank's for that, all is ok but i have some times an error :

when i want to redirect :
www.pets-easy.com/boutique/tapis-et-paillasson/tapis-american-akita-detail
to
www.pets-easy.fr/tapis-american-akita.html

i use :
^/boutique/tapis-et-paillasson/tapis-.*-detail$
to
www.pets-easy.fr/tapis-{preg_match 1}/tapis-(.*)-detail/i{/preg_match}.html

But it return

www.pets-easy.fr/tapis-.html

I think it's because it find the first "tapis-"

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

More
8 years 8 months ago - 8 years 8 months ago #4792 by admin
Replied by admin on topic redirect with a part of url !
You are right, preg_match uses the full URL.

You could change the rule as follow:
To URL: {scheme}://www.pets-easy.fr/tapis-{preg_match 1}/\/tapis-et-paillasson\/tapis-(.*)-detail/i{/preg_match}.html
Last edit: 8 years 8 months ago by admin.

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

  • strouve181
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #4794 by strouve181
Replied by strouve181 on topic redirect with a part of url !
thank's , i used that but without the" /\/" and of course it's not working good. I test it and tell you more.

thank's again

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

More
8 years 8 months ago #4797 by admin
Replied by admin on topic redirect with a part of url !
u're welcome

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

Time to create page: 0.134 seconds