Support » Networking WordPress » Multisite sub-directories IIS 7.5 Redirect Loop

  • Resolved mioswebdesigns


    Setting up Multisite with IIS has been a nightmare from the start, believe me if I had the choice to use Apache I would have. Okay, here goes…

    I’ve had multiple issues since activating Multisite, following the steps found here ->

    First issue was not being able to access sub-directories, luckily I found answer here ->

    Now biggest issue is the notorious redirect loop. Short version of problem is I can go to a sub-directory e.g. and login from there, however if I go to and try to login, I get redirect loop. Also, if I login from a sub-directory, then from Dashboard click My Sites > Network Admin > Dashboard, Sites, Users, etc… I am redirected to login page (as if it forgets I’m logged in) and I get sucked into Redirect Loop.

    Something interesting to point out – I do not get redirect loop if I’m remoted into server via RDP. It accepts my login from any site either primary or sub-directory, and I can access any part of site without it forgetting I’m logged in, which is what I want. Problem is, I’m setting up training environment for hundreds of employees, and I can’t have them remoting into server box 🙂

    I have hunted the internet and have tried a few solutions so far, I’ll also point out that I started this from a fresh install of everything, and I started Multisite with and not

    Here is my web.config file:

    <?xml version="1.0" encoding="utf-8"?>
    				<clear />
    				<add name="X-UA-Compatible" value="IE=edge" />
    			<remove fileExtension=".svg" />
    			<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
                <remove name="PHP54_via_FastCGI" />
                <remove name="PHP55_via_FastCGI" />
                <remove name="PHP53_via_FastCGI" />
                <add name="PHP5_5_via_FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.5\php-cgi.exe" resourceType="Either" />
                    <rule name="WordPress Rule 1" stopProcessing="true">
                        <match url="^index\.php$" ignoreCase="false" />
                        <action type="None" />
                    <rule name="WordPress Rule 2" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?files/(.+)" ignoreCase="false" />
                        <action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false" />
                    <rule name="WordPress Rule 3" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?wp-admin$" ignoreCase="false" />
                        <action type="Redirect" url="{R:1}wp-admin/" redirectType="Permanent" />
                    <rule name="WordPress Rule 4" stopProcessing="true">
                        <match url="^" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAny">
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
                        <action type="None" />
                    <rule name="WordPress Rule 5" stopProcessing="true">
                        <match url="^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*)" ignoreCase="false" />
                        <action type="Rewrite" url="{R:1}" />
                    <rule name="WordPress Rule 6" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
                        <action type="Rewrite" url="{R:2}" />
                    <rule name="WordPress Rule 7" stopProcessing="true">
                        <match url="." ignoreCase="false" />
                        <action type="Rewrite" url="index.php" />
                    <clear />
                    <add value="index.php" />
                    <add value="index.html" />
                    <add value="index.htm" />

    Here is my wp-config.php file:

     * The base configurations of the WordPress.
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH. You can find more information
     * by visiting {@link Editing
     * wp-config.php} Codex page. You can get the MySQL settings from your web host.
     * This file is used by the wp-config.php creation script during the
     * installation. You don't have to use the web site, you can just copy this file
     * to "wp-config.php" and fill in the values.
     * @package WordPress
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'wordpress273');
    /** MySQL database username */
    define('DB_USER', 'xxx');
    /** MySQL database password */
    define('DB_PASSWORD', 'xxx');
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
     * Authentication Unique Keys and Salts.
     * Change these to different unique phrases!
     * You can generate these using the {@link secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     * @since 2.6.0
    define('AUTH_KEY',         'xxx');
    define('SECURE_AUTH_KEY',  'xxx');
    define('LOGGED_IN_KEY',    'xxx');
    define('NONCE_KEY',        'xxx');
    define('AUTH_SALT',        'xxx');
    define('SECURE_AUTH_SALT', 'xxx');
    define('LOGGED_IN_SALT',   'xxx');
    define('NONCE_SALT',       'xxx');
     * WordPress Database Table prefix.
     * You can have multiple installations in one database if you give each a unique
     * prefix. Only numbers, letters, and underscores please!
    $table_prefix  = 'wp_';
     * WordPress Localized Language, defaults to English.
     * Change this to localize WordPress. A corresponding MO file for the chosen
     * language must be installed to wp-content/languages. For example, install
     * to wp-content/languages and set WPLANG to 'de_DE' to enable German
     * language support.
    define('WPLANG', '');
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', '');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
     * For developers: WordPress debugging mode.
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
    define('WP_DEBUG', false);
    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');
    /* That's all, stop editing! Happy blogging. */
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    As I mentioned above, it knows my credentials are good, because if I deliberately type in wrong username/password it shows me this:

    But if I user correct username/password, it just returns to login page and clears fields like this:

    The URL reads:

    If I remote into server using RDP, and login to WordPress there, I do not get redirected, and URL is the same.

    Here are my versions:

    Windows 2008 R2 datacenter 64bit
    IIS 7.5
    IIS Rewrite Module 2
    PHP Manager 1.2 for IIS 7
    MySQL Server 5.5
    MySQL Connector Net 6.5.4
    WordPress 3.8.1

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    Have you tried deleting all cookies related to that domain?

    Yeah I had to perform a dnsflush and that did the trick. It seems typing wp-admin in URL doesn’t seem to work with Multisite but using meta widget and clicking Login link which takes me to wp-login.php that works 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multisite sub-directories IIS 7.5 Redirect Loop’ is closed to new replies.