Hi @Rich K ,
According to your description, I think you want to hide .html
in the URL, but don't want to hide .html
in the URL containing the admin directory and all its subdirectories, because this will give an error.
I have a method that requires some modification to your rewrite rule named Redirecting .html ext
. In the matching URL, use regular expressions to exclude specific strings "admin"
.
<match url="^(.*).html" /> is changed to <match url="^(?!admin)(.*).html" / >
This worked for me, you can try it.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Yurong Dai