• 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 https://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, https://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.

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

    (@ipstenu)

    ?????? Advisor and Activist

    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/

    Thread Starter umchal

    (@umchal)

    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: https://s14.postimage.org/mhc1i11y9/subdomain_cpanel.jpg

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

    Thread Starter umchal

    (@umchal)

    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.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Setting up Multi-Sites on Limited Sub-domain Access Server’ is closed to new replies.