Help with a Rule
-
moose999
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 2
-
Thank you received: 0
-
-
10 years 10 months ago #2436
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.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
10 years 10 months ago - 10 years 10 months ago #2437
by admin
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: 10 years 10 months ago by admin.
Please Log in or Create an account to join the conversation.
-
moose999
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 2
-
Thank you received: 0
-
-
10 years 10 months ago #2438
by moose999
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.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
Time to create page: 0.145 seconds