× Here you can get community support related to ReDJ.

my redirections are working but need imporvements

More
11 years 3 months ago #589 by pao.1
Ciao Luigi !

I'm using ReDJ in 4 sites now that you helped me with it ;)

Today I'm facing a new problem : in the new site I'm working on I have multiple pages with similar endings but I don't know to get rid of too many redirections.

Example :
  • /images/boitier_A.html -- pointing to-- /images/boitier-couleur.html
  • /images/boitier_B.html -- pointing to-- /images/boitier-couleur.html
  • /images/boitier_C.html -- pointing to-- /images/boitier-couleur.html
  • /images/boitier_D.html -- pointing to-- /images/boitier-couleur.html

How can I have them all redirected to the same page with a single redirection in ReDJ ? (something like /images/boitier* where * would replace anything after "boitier")


Grazie a te per RedJ. É stato un prezioso salvatore !

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

More
11 years 3 months ago #591 by admin
Hi and thanks for using ReDJ.

Try this rule:
From URL: /images/boitier_
To URL: http://{siteurl}/images/boitier-couleur.html
Request only: True

Destination doesn't match the source rule cause the presence of the underscore... :)

Kind regards,
Luigi
The following user(s) said Thank You: pao.1

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

More
11 years 3 months ago - 11 years 3 months ago #592 by pao.1
Milioni di grazie!

I will try it.

Just one more thing, what if I have something like that ?
  • /images/boitier_A.html
  • /images/boitier-B.html

Would I have to write the "From URL" like this to get rid of anything after "boitier" ?

From URL: /images/boitier


(seams too easy !)

Once again : thank you for your perfect support ! ;)
Last edit: 11 years 3 months ago by pao.1.

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

More
11 years 3 months ago #597 by admin
No, you can't, because this pattern also matches the destination and you cause a redirection loop. My rule works well just because the source pattern has the underscore, while the destination has the minus sign.

I hope this makes sense for you.

Best regards,
Luigi

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

More
11 years 3 months ago #599 by pao.1
Got it Luigi ! Thank you very much.

So, if I want my rule to work the destination must be really different, by example :

From URL:
/images/boitier

To URL:
http://{siteurl}/newfolder/boitier-couleur.html


This way anything after "boitier" will be redirected to the "newfolder" URL. Am I wrong?

Again and again : thank you! I'm saving hours with ReDJ.

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

More
11 years 3 months ago #600 by admin
This example works.
To be detailed, "different" is not enough. To avoid loops the destination URL should not match the rule. Consider that a rule matches even when it corresponds to a part of the URL. And it can be also a regular expressions.

Best regards,
Luigi

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

Time to create page: 0.103 seconds