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

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

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

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.