Text in Expression Editor:
Text after Path > Rewrite to... > Dynamic:
Create a rewrite URL rule (part of Transform Rules) to rewrite any requests for /news/2012/...
URI paths to /archive/news/2012/...
.
To rewrite all requests to /news/2012/...
to /archive/news/2012/...
you must add a reference to the content of the original URL. Create a new rewrite URL rule and define a dynamic URL path rewrite using an expression:
Text in Expression Editor:
Text after Path > Rewrite to... > Dynamic:
The filter uses the starts_with()
function all paths starting with /news/2012/
. The dynamic path rewrite uses the concat()
function to concatenate a prefix to the original URL path of the HTTP request.