• Josef Stevens

    (@smashingpixelsjoe)


    I have a Worpress Multisite installation that uses subdomains. The main site is https://energywerx.ca and the subdomains are divisions of the company, for example https://alberta.energywerx.ca.

    Starting today any new pages created on the subdomain alberta.energywerx.ca are directing to the main site, energywerx.ca. Any pages created prior to today continue to work as expected.

    There have been no recent site changes beyond regular updates to core, theme or plugins, no DNS or other changes. These sites have been active for over a year without any issue.

    If anyone has any insight it would be greatly appreciated.

    From previous questions I have looked at I understand that the htaccess file may be important in this case, so here it is:

    SetEnv PHPRC /home/customer/www/energywerx.ca/public_html/php.ini
    # HTTPS forced by SG-Optimizer
    <IfModule mod_rewrite.c>
    	RewriteEngine On
    	
    	RewriteCond %{HTTP:X-Forwarded-Proto} !https
    	RewriteCond %{HTTPS} off
    	RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    </IfModule>
    # END HTTPS
    
    # BEGIN WordPress
    # The directives (lines) between BEGIN WordPress and END WordPress are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    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).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    
    # END WordPress
    # SGO Unset Vary
    Header unset Vary
    # SGO Unset Vary END

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The .htaccess file is primarily used to control the server’s behavior for specific directories or URLs of a website. The provided .htaccess file contains rules to enforce HTTPS and remove the Vary header for performance reasons. Additionally, it contains the standard WordPress rewrite rules for clean URLs.

    As such, the issue with your subsites may be related to a different configuration, such as the WordPress Network Settings or the configuration of the individual subsite.

    Here are some potential solutions to investigate:

    1. Check the WordPress Network Settings: Ensure that the “Site Address (URL)” and “WordPress Address (URL)” are correctly set for each subsite. These settings can be found in the Network Admin Dashboard under “Sites > Edit” for each subsite.
    2. Verify the .htaccess file for subsites: Check that each subsite has its own .htaccess file, and it contains the correct rewrite rules for that specific subsite.
    3. Review the subsite’s configuration: Check the settings of each subsite in the WordPress Dashboard, specifically under the “Settings” menu. Ensure that each subsite has the correct configuration settings, including the “Site URL” and “Home” options.
    4. Check for conflicting plugins or themes: Deactivate any plugins or themes that could potentially conflict with the subsite’s configuration. You can try to activate each one again to see which one may be causing the issue.
    5. Contact your web hosting provider: If none of the above solutions resolve the issue, contact your web hosting provider for further assistance. They may be able to provide additional insights into the configuration of your WordPress Multisite installation.
    auspayday

    (@auspayday)

    Based on the information provided, it’s possible that there may be an issue with the subdomain’s DNS configuration. Here are a few things you can check:

    1. Check that the DNS records for the subdomain are still pointing to the correct server. You can do this by looking up the DNS records for the subdomain using a tool like MX Toolbox.
    2. Check that the subdomain is still configured in the WordPress multisite network. Go to the Network Admin dashboard and navigate to Sites > All Sites. Look for the subdomain site and make sure it is still listed.
    3. Check that the subdomain’s URL is correct in the site’s settings. Go to the subdomain site’s dashboard and navigate to Settings > General. Make sure the WordPress Address (URL) and Site Address (URL) are both set to the correct subdomain URL (e.g. https://alberta.energywerx.ca).
    4. Check that there are no conflicting plugins or settings that may be redirecting the subdomain to the main site. Try disabling any recent plugins or settings changes to see if that resolves the issue.

    If none of these steps resolve the issue, it may be helpful to reach out to your web host or a WordPress developer for further assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multisite Links not Working’ is closed to new replies.