× 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 #4770 by strouve181
redirect with a part of url ! was created by strouve181
hello,

I want to redirect some url with a part of them like this :

/boutique/autocolants-coucou-detail

to

www.pets-easy.fr/autocollants-ronds-personnalises-coucou.html

The "coucou" is the string and the website is not the same.

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

More
8 years 8 months ago #4774 by admin
Replied by admin on topic redirect with a part of url !
Sorry,
not clear when you say "The "coucou" is the string". Does this mean that we need to intercept ANY URL that contains the "coucou" word inside?

If you need a rule valid for many URLs it would be better if you post 2 or 3 full examples of required redirections (source->target).

Thanks,
Luigi

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 #4777 by strouve181
Replied by strouve181 on topic redirect with a part of url !
Ok, sorry.

my old url :

www.pets-easy.com/boutique/autocolants-coucou-detail

and the new one :

www.pets-easy.fr/autocollants-ronds-personnalises-coucou.html

it's always the same, i change the website adresse and the "coucou" it's a name of breed like german-shepherd etc

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

More
8 years 8 months ago - 8 years 8 months ago #4778 by admin
Replied by admin on topic redirect with a part of url !
So you need a simple redirect (old URL) ==> (new URL). Create a rule as follow:
From URL: ^/boutique/autocolants-coucou-detail$
To URL: http://www.pets-easy.fr/autocollants-ronds-personnalises-coucou.html
Request only: true (checked)
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 #4779 by strouve181
Replied by strouve181 on topic redirect with a part of url !
Yes of course , but "coucou" is a string and change every time . i must take it in the old url and put in the new.

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

More
8 years 8 months ago #4780 by admin
Replied by admin on topic redirect with a part of url !
Ahhh ok :)

Try this (you have the Enteprise version):
From URL: ^/boutique/autocolants-.*-detail$
To URL: http://www.pets-easy.fr/autocollants-ronds-personnalises-{preg_match 1}/autocolants-(.*)-detail/i{/preg_match}.html
Request only: true (checked)

Sincerely,
Luigi

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

Time to create page: 0.178 seconds