url rewriting – IIS URL Rewrite http to https with multiple subfolder

How can I set the correct redirect for all subfolders?
Is it happening to me at the moment that everything is working properly, but some that are not found, return to static.

This is what my wwwroot file looks like, can I just set up this web.config file?

enter image description here

Or I have to configure for each subfolder-> web.config file separately.

The current web.config I tried.

<?xml version="1.0" encoding="UTF-8"?>
                <clear />
                <add value="Default.asp" />
                <add value="default.html" />
                <add value="index.php" />
                <add value="Default.htm" />
                <add value="index.htm" />
                <add value="index.html" />
                <add value="iisstart.htm" />
                <add value="default.aspx" />
                <rule name="Http to HTTPS" enabled="true" stopProcessing="true">
                    <rule name="NoSSL - folder" enabled="true" stopProcessing="true">
                        <match url="^SubFolder1/.*" />
                            <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <action type="None" />
                    <match url="(.*)" />
                        <add input="{HTTPS}" pattern="off" />
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />