I'm using Pathauto to produce nice URLs for my Drupal 7 site, and have run into the need to edit the URLs based on a node field value.
Specifically, when the content is archived on my website, the URL needs to be automatically changed to include the substring 'archive'. So when editing this page:
www.mysite.com/mypage
and node:field-status
is changed from none
to archived
, I need the URL to become:
www.mysite.com/archive/mypage
Also, pages that already feature a substring, such as mysite.com/blog/mypage
would ideally have the new substring prepended to the relative URL, so:
www.mysite.com/archive/blog/mypage
I have tried using Flags and Rules to rewrite the URL pattern based on the field value, but with no luck. Any ideas?