WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Are subdomains possible on a subdomain install of WP (11 posts)

  1. spaceghost65
    Member
    Posted 2 years ago #

    Disclaimer:
    I have searched the forums and read so much. the last reply to this was about 2 years ago so I thought I'd try. I have a network admin who can edit .htaccess and reload Apache at any time.

    Question:
    Are subdomains possible with a subdomain install of WP?
    The install is at wordpress.domain.edu
    Is subdomainname.wordpress.edu possible?

    More Info:

    WP 3.4.1
    WordPress MU Domain Mapping is installed but not activated, I did not want to break something.

    .htaccess:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    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]
    
    # END WordPress

    wp-config:

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'wordpress-test.domain.edu');
    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__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    Any help here is appreciated even a "Yes/Not Possible". Thank you.

  2. Is subdomainname.wordpress.edu possible?

    Yes, btu only if your server is set up to permit sub-subdomains.

    Out of the box, WordPress should let you do that. No domain mapping needed.

  3. frisco
    Member
    Posted 2 years ago #

    Not trying to hijack, but I was researching this same topic.

    I'm wondering if the OP meant to ask if subdomainname.wordpress.domain.edu is possible, since that is the subdomain of the main WP install.

    I ask because I have a MS install with subdomains, at say domain.com. Normally, I would create subdomain.domain.com, and then I could use domain mapping. That works like a charm.

    After reading this, I tried to create blog.subdomain.domain.com (before I had created subdomain.com) thinking it would work, but it did not.

    Is my case different from the OP's?

  4. Yes, your case is different :)

    For your situation to work, you would need to either map the sub sub, or use a multi network plugin (and I don't believe any actually let you do that).

    If you install WP in sub.domain.com then you can make sites as site2.sub.domain.com because the root of the WP install is sub.domain.com - Any time you're extending your base install in one direction, it works. It's when you try to go two or more that things go bibeldy off the edge of sanity.

  5. frisco
    Member
    Posted 2 years ago #

    Thanks. I appreciate your efforts to keep us in the middle of the road.

    Since I want to stay on this side of sanity, using domain mapping and only going in 1 direction for the site creation, can I domain map a site in 2 directions, ie:

    1) create a site called subdomain.domain.com
    2) domain map that site to blog.subdomain.com (note that I dropped domain, which is the part of the main WP install)

  6. spaceghost65
    Member
    Posted 2 years ago #

    Yes, btu only if your server is set up to permit sub-subdomains.
    Out of the box, WordPress should let you do that. No domain mapping needed.

    I would assume so as well. I can create the site and see it within the Network Admin area. I can adjust settings to the new site except assign a theme to it, and of course actually viewing it.

    Agree my situation is different than frisco, I do not need subsub.subdomain.domain.edu
    only sub.domain.edu.

    What can I tell my Sys Admin to check for if anything on the server?

  7. can I domain map a site in 2 directions

    Maybe? Possibly ... You'd have to try that out.

    I would assume so as well. I can create the site and see it within the Network Admin area. I can adjust settings to the new site except assign a theme to it, and of course actually viewing it.

    What error do you get when viewing it?

  8. spaceghost65
    Member
    Posted 2 years ago #

    doesn't resolve at all. 404

    its trying to resolve subsub.subdomain.domain.edu

    Wildcard subdomains are enabled as well.

  9. Which 404? Your server's or your site's? They look different :)

  10. spaceghost65
    Member
    Posted 2 years ago #

    hich 404? Your server's or your site's? They look different :)

    Mika >> Server. Since the WP install is on a subdomain and not in the root of our site we are going to have to go with the sub-folder route. I guess we could rewrite the url to snip the primary subdomain but..what a mess.

    Thanks for the help, I'm going to close this one out for me but the lesson here i think is if your WP install is not in the root and on a subdomain, you will have to work some server magic if you want to use the subdomain type of multisite network to avoid subsub.subdomain.domain.com

  11. They are working on this, actually. Progress has been made.

Topic Closed

This topic has been closed to new replies.

About this Topic