The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Set up multisite subdomain (15 posts)

  1. klampl
    Posted 2 years ago #

    Windows Server 2008 R2 IIS 7.5 with rewrite enabled.

    I have a install of WordPress in its own folder (wordpress2.ctctel.com) it is redirected by the index.php in the root to its installed folder "blogs".(http://wordpress2.ctctel.com/wp-admin/network/site-info.php?id=1 and http://wordpress2.ctctel.com work. it adds the /blog where it needs to)
    The main site works perfect under multisite network.

    However when I add a new site webserver2.wordpress2.ctctel.com I cannot get to the dashboard nor visit site option http://wordpress2.ctctel.com/wp-admin/network/site-info.php?id=3 works.
    gets a 404 error as well as

    should not WordPress using the same structure as the main site redirect it to the blogs folder and give it its site id URL?
    my .htaccess is:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blogs/
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    the index in the root is:

    define('WP_USE_THEMES', true);
    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . '/blogs/wp-blog-header.php' );

    the wp-config is:

    define('WP_DEBUG', true);
    /******************************** Multisite Network*/
    define( 'WP_ALLOW_MULTISITE', true);
    /*start network setup */
    $base = dirname(__FILE__) . '/';
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    /*define('DOMAIN_CURRENT_SITE', 'wordpress2.ctctel.com');*/
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    define( 'SUNRISE', 'on' );
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    any help is greatly appreciated,

  2. Hm. That's not the setup I ended up with


    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) blogs/$1 [L]
    RewriteRule ^(.*\.php)$ blogs/$1 [L]
    RewriteRule . index.php [L]
  3. klampl
    Posted 2 years ago #

    I had to guess on the .htaccess since when I installed the network it only showed web.config and wp-config.

    I copied yours and over wrote the .htaccess in the root folder.
    same result.

  4. klampl
    Posted 2 years ago #

    I notices that even though I go to http://webserver2.wordpress2.ctctel.com:80/blogs/

    the physical path is incorrect. it goes to E:\inetpub\wwwroot\blogs\ instead of E:\inetpub\wwwroot\wordpress\blogs\
    what could be causing this?

  5. You cannot use Multisite with a port number in the URL. That wont ever work.

    the physical path is incorrect. it goes to E:\inetpub\wwwroot\blogs\ instead of E:\inetpub\wwwroot\wordpress\blogs\

    http://webserver2.wordpress2.ctctel.com/ is not showing anything expected at all.

    Notice how THAT 404 looks compared to http://wordpress2.ctctel.com/asfasDSa ?

    You didn't set up DNS or vhosts (whatever that is on IIS) right.

    http://webserver2aasdas.wordpress2.ctctel.com/ is the same way where that SHOULD be a signup page in WP.

  6. klampl
    Posted 2 years ago #

    sry I posted what was in the error on requested URL

    No DNS is not setup the server has a static IP. and no virtual host or directory.
    what I do not understand is that it works correctly with the original site but not the one I created under Netwok>add new site.

    if I manually type http://webserver2.wordpress2.ctctel.com/blogs/ I get a site.

  7. klampl
    Posted 2 years ago #

    I can do everything but visit the site.

  8. http://webserver2.wordpress2.ctctel.com/blogs/ - I get a 404

    A server based 404

  9. klampl
    Posted 2 years ago #

    Sorry, figured out how I could go to the site. another admin created a website http://webserver2.wordpress2.ctctel.com/blogs/ . I removed it and I get a 404 also.
    I have gone to the extreme in this install. I deactivated and removed all plugins and removed all themes besides twentythirteen.
    so as of now this site has no plugins.
    Since multisite is built in do I need the plugin networks for WordPress?


  10. No, you don't need any plugins for this.

    http://webserver2.wordpress2.ctctel.com/blogs/ is a server based 404. This means your server is set up wrong somehow, becuase at the very least you SHOULD get http://wordpress2.ctctel.com/asfasDSa (see how that's a WP 404?).

    Check your server's error log.

  11. klampl
    Posted 2 years ago #

    I tore down the entire site and did it all again. Im at the same spot. should not http://abcd.wordpress2.ctctel.com give me a wp 404?

  12. Did you set up subDOMAIN or subFOLDER?

  13. klampl
    Posted 2 years ago #


    webserver2.wordpress2.ctctel.com am I confused on this?

    it was setup for wildcard subdomain.

  14. klampl
    Posted 2 years ago #

    I figured out that the admin who did the domain wildcard did not do it correctly. That is now fixed. however, I can do an nslookup and it returns the ip address as well as ping it. But in IIS I am still getting the http 404 instead of the wp404. Any ideas on why this is?

  15. It's something to do with your server :/ And I know >this< much about IIS :(

Topic Closed

This topic has been closed to new replies.

About this Topic