I’ve searched for a while on this and haven’t found a solution.
I have a documents folder and I want to redirect all of the folders and files within documents from /documents to /images/documents. This is one of the rules I have tried and nothing I try seems to work. Other rules I have that are simpler work fine.
Example, I want domain.com/documents/news/2024/file.pdf
to redirect to domain.com/images/documents/news/2024/file.pdf
this is where I am
<rule name="..." stopProcessing="true">
<match url="^documents/news/(.*)$" />
<action type="Rewrite" url="images/documents/news/{R:1}" redirectType="Permanent"/>
</rule>