web.config configuration for enable a static images folder and worpress in a folder

I know how to enable static folders in a wordpress instalation using apache, now I’m migrating to IIS and I’m not pretty sure about how configure the web.config:

basically, I’ve got this folder setup

httpdocs
--- Firmas
--- wp_installation

I need that when the user goes to mysite.com/images/1.jpg shows the image correctly…but also I need than when the user goes to mysite.com run the wordpress inside wp_installation

knowing that the rules run in order I try this, but I’m pretty sure then it’s not the right way

  <rules>
            <rule name="exlcluye_firmas" stopProcessing="true">
                <match url="^/Firmas/*" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="None" />
            </rule>

             <rule name="Main Rule" stopProcessing="true">
                <match url=".*" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="Rewrite" url="/wp_installation/index.php" />
            </rule>


        </rules>

can you give me a hand with this?..thank you so much guys!! have a great day

Read more here: web.config configuration for enable a static images folder and worpress in a folder

Leave a Reply

Your email address will not be published. Required fields are marked *