× Here you can get community support related to ReDJ.

Help with a Rule

  • moose999
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 11 months ago #2436 by moose999
Help with a Rule was created by moose999
Hi,

I have a rule like:
From URL: /2013.html\?id=35
To URL: /2013/35

But i want a rule that that will match any year and ID in the source, and then correctly add them to the destination. Can anyone help please?

Many thanks,
Justin.

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

More
9 years 11 months ago - 9 years 11 months ago #2437 by admin
Replied by admin on topic Help with a Rule
Hi Justin,
try this:
From URL: ^/[0-9]{4}\.html\?id=[0-9]{1,10}$
To URL: http://{siteurl}/${year}/{queryvar id}
Request only: true (checked)
Placeholders:
p={path}
year={preg_placeholder 1,p}/\/([0-9]+)\.html/i{/preg_placeholder}

Kind regards,
Luigi
Last edit: 9 years 11 months ago by admin.

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

  • moose999
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 11 months ago #2438 by moose999
Replied by moose999 on topic Help with a Rule
Thank you so much, I understand the whole thing more clearly now, and have already built a new rule of my own based on your help :)

Best regards,
Justin

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

More
9 years 11 months ago #2439 by admin
Replied by admin on topic Help with a Rule
U're welcome :)

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

Time to create page: 0.085 seconds