WordPress.org

Forums

Setting up Multi-Sites on Limited Sub-domain Access Server (5 posts)

  1. umchal
    Member
    Posted 2 years ago #

    Hello,

    I could not find a good way to phrase the title for my specific issue.

    I'm trying to set up sub-domain-based multisites. My shared host allows sub-domains to be created via cPanel but it just redirects to the directory of the sub-domain name.

    For example, if I add a subdomain named "support" as support.mydomain.com, then it creates a folder /home/myusernae/public_html/support and redirects to that folder.

    If I create a new site named "support" via the network admin panel of WordPress and access to http://support.mydomain.com the page shows Index of / which is the index page of the directory, /home/myusername/public_html/support. If I try to access the admin page, http://support.mydomain.com/wp-admin/, it says "500 internal Server Error"

    Is there a workaround for this?

    I created index.php in /home/myusername/public_html/support, editing the following part,

    /** Loads the WordPress Environment and Template */
    require('../wordpress/wp-blog-header.php');

    It loads the text but the stylesheet is not loaded.

  2. I'm trying to set up sub-domain-based multisites. My shared host allows sub-domains to be created via cPanel but it just redirects to the directory of the sub-domain name.

    There should be a way to override that in cpanel. Change the folder from /home/myusernae/public_html/support to /home/myusernae/public_html/

  3. umchal
    Member
    Posted 2 years ago #

    I have two servers and one of it had the setting you mentioned (thank you so much!). However, the other server's cPanel did not have the setting to change the directory. Actually that's the server I'm planning to moving to.

    Screenshot: http://s14.postimage.org/mhc1i11y9/subdomain_cpanel.jpg

    I found the setting for DNS Zone but it seems I cannot have access to httpd.conf.

  4. umchal
    Member
    Posted 2 years ago #

    The current directory structure is like this:

    - /home/myusername/public_html/wordpress
    - /home/myusername/public_html/wordpress/.htaccess
    - /home/myusername/public_html/wordpress/index.php
    - /home/myusername/public_html/.htaccess
    - /home/myusername/public_html/index.php
    - /home/myusername/public_html/support

    The main site is installed in the wordpress directory.

    I tried putting the following lines to .htaccess in /home/myusername/public_html/support. The directory has only the .htaccess file without index.php.

    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).*) wordpress/$1 [L]
    RewriteRule ^(.*\.php)$ wordpress/$1 [L]
    RewriteRule . index.php [L]

    I hoped it would make a difference and it showed 500 Internal Server Error when support.mydomain.com is accessed. If I removed the .htaccess file, it shows the directory index.

    I'm hoping that this could be achieved with ModRewrite rules. I tried creating a symbolic link but it is disabled by the server.

  5. Yeah, that's not cpanel the second one. You need to ask your webhost how to do it.

Topic Closed

This topic has been closed to new replies.

About this Topic