× Here you can get community support related to ReDJ.

Multiple redirects in one rule

  • zheeka
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 3 months ago #6968 by zheeka
Multiple redirects in one rule was created by zheeka
Hi,
this will probably be a stupid question, but I just can't understand the rules of forwarding written in your documentation..
Here's what I'd like to achieve if it's possible:
I have hundreds of links with 4 different language codes. The only thing that differs the links is that at the end of the link there is a different number. I need to forward all those links to the homepage of the language it belongs to. They all look like this:
www.mysite.com/languagecode/news/articles/1
www.mysite.com/languagecode/news/articles/2
www.mysite.com/languagecode/news/articles/3
www.mysite.com/languagecode/news/articles/4
www.mysite.com/languagecode/news/articles/5
and so on..

Is there a rule I can apply and do it in just four forwarders (because I have 4 languages) or do I have to do it manually hundreds of times?

Thnx in advance!

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

  • zheeka
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 3 months ago #6974 by zheeka
Replied by zheeka on topic Multiple redirects in one rule
Hi,
in the mean time, I've added four forwarders, and it works, I'd just like to check with you if the way I did it is OK and will not create a conflict of some sorts..:
I've added this
www.mysite.com/en/news/
and forwarded it to
www.misite.com

and done that for three other languages and it works. Is that ok or will my site blow up? :side:

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

More
5 years 3 months ago #6976 by admin
Replied by admin on topic Multiple redirects in one rule
I can't see any danger with a rule like this:
From URL: ^/en/news/
To URL: {scheme}://{siteurl}/{pathltrim /en/news/}{queryfull}
Request only: true (checked)

Kind regards
Luigi

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

Time to create page: 0.122 seconds