× Here you can get community support related to ReDJ.

Please explain creating a rule

  • veganvixen
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 7 months ago #4248 by veganvixen
Please explain creating a rule was created by veganvixen
Hi,

I have read the documentation, but I am totally confused. :( Would you be so kind as to show me exactly how to create a rule? I don't understand how to set the characters in the urls as per your instructions.

For example, how would I set the following:

FROM URL: www.mysite.com/links/23-art

TO URL: www.mysite.com

Would this be correct:

From URL: ^/http://www.mysite.com/links/23-art
To URL: http://{www.mysite.com}/

Help is greatly appreciated. :)

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

More
8 years 7 months ago #4249 by admin
Replied by admin on topic Please explain creating a rule
Hi,
the rule should be:
From URL: ^/links/23-art$
To URL: {scheme}://{siteurl}/
Request only: true (checked)

Kind regards

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

  • veganvixen
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 7 months ago #4250 by veganvixen
Replied by veganvixen on topic Please explain creating a rule
Hi and thank you so much for responding!

So the TO URL requires no customization? Maybe the component reads the site url???

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

More
8 years 7 months ago - 8 years 7 months ago #4251 by admin
Replied by admin on topic Please explain creating a rule
The plugin (not the component) compares each URL requested with ReDJ rules (created with the component). The comparison is made with a single optimized SQL query. If one or more rules match, the first one (lowest ordering) will be applied. The From URL part can be just a part of the URL and can be a regular expression. The target URL must declare a full URL, but can include macros, (like {scheme}), which will be calculated and replaced just before to make the redirect. That's all.
Last edit: 8 years 7 months ago by admin.

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

  • veganvixen
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 7 months ago - 8 years 7 months ago #4252 by veganvixen
Replied by veganvixen on topic Please explain creating a rule
Hi,

Thanks for trying to explain, but I did not understand that at all. :blush:

I just want to know how to exactly create the From and To rule.

You said this is what I should put for the TO rule? I do not need to edit the siteurl?

To URL: {scheme}://{siteurl}/
Last edit: 8 years 7 months ago by veganvixen.

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

More
8 years 7 months ago #4253 by admin
Replied by admin on topic Please explain creating a rule
You have to copy "exactly" the rule as I wrote, don't need to change or edit anything. So, copy & paste my rule and it will work.
The following user(s) said Thank You: veganvixen

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

Time to create page: 0.152 seconds