IIS URL rewrites

Having trouble with the Q&A plugin in IIS 7.5. Getting 404 and 500 errors. Starting to dig in deeper but I wanted to check in to see if this is a known issue with simple fix. Best! -db

  • aecnu
    • WP Unicorn

    Greetings dbroyles,

    Welcome to WPMU DEV and thank you for the great question.

    Are you using multisite? Rewrites are only used for images in multisite.

    You’ll need to rewrite rules for uploads handling:

    <rule name="Imported Rule 1" stopProcessing="true">
    <match url="^(.*/)?files/$" ignoreCase="false" />
    <action type="Rewrite" url="index.php" />
    </rule>
    <rule name="Imported Rule 2" stopProcessing="true">
    <match url="^(.*/)?files/(.*)" ignoreCase="false" />
    <conditions>
    <add input="{URL}" pattern=".*wp-content/plugins.*" ignoreCase="false" negate="true" />
    </conditions>
    <action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false" />
    </rule>

    Please advise if that indeed gets the job done for you.

    Cheers, Joe

  • Brian Purkiss
    • Smushie Pies

    We hope you were able to resolve this. Since this thread has been inactive for some time I am going to go ahead and close the ticket. If you were unable to resolve it or have any further questions, please feel free to re-open the ticket – we are more than happy to help!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.