Forum | Really Simple SSL

WordPress Multisite redirects subpages to homepage

Home Forums Multisite WordPress Multisite redirects subpages to homepage

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #288904

    Summary of the problem: I have a new wordpress multisite set up as subdirectories (same base URL with languages subdirectories, like for example), it’s working fine in itself apart from this one very annoying issue: Everytime I am trying to access a subpage of the main domain (like or for example), it redirects to the homepage of this domain (

    Observation 1: This weirdly only happens the first time you try to load a subpage of the main domain on a tab. Like for example, you are on facebook, see an ad, click on the link, or say you open a blank tab and type, you get redirected to BUT THEN, if now from this tab you try to go to the subpage (any subpage), it works fine. That’s only happening the first time you load the domain on the page.

    Observation 2: I think the problem started when I enabled SSL with the plugin Really Simple SSL. I tried deleting its part of the .htaccess file, but that didn’t solve anything. I don’t know if it adds anything else than the lines in .htaccess (like some redirection in the database maybe?). I think I enabled it on the main site initially (and not on the network dashboard), this is why I’m wondering if it’s involved somehow.

    Observation 3: This problem doesn’t seem to affect the subdirectories. For example, if I go to, that works as it should, even on a new blank tab. It seems that only the main domain is concerned.

    Permalinks are set to Custom : /%postname%/

    Server Info: Apache Hosting company: OVH PHP Version: 7.3.6 MySQL vesion: 5.6.43

    Here is the .htaccess (with Really Simple SSH part already deleted) :

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [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
    # BEGIN ShortPixelWebp
    # END ShortPixelWebp

    I suppose you know, but this is what I deleted from Really Simple SSL :

    # BEGIN rlrssslReallySimpleSSL rsssl_version[3.2.2]
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    # END rlrssslReallySimpleSSL

    And here is the wp-config.php (without logins) :

     * The base configuration for WordPress
     * The wp-config.php creation script uses this file during the
     * installation. You don't have to use the web site, you can
     * copy this file to "wp-config.php" and fill in the values.
     * This file contains the following configurations:
     * * MySQL settings
     * * Secret keys
     * * Database table prefix
     * * ABSPATH
     * @link
     * @package WordPress
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'XXXXXXXXXXXX');
    /** MySQL database username */
    define('DB_USER', 'XXXXXXXXXXXX');
    /** MySQL database password */
    /** MySQL hostname */
    define('DB_HOST', 'XXXXXXXXXXXX');
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
     * Authentication Unique Keys and Salts.
     * Change these to different unique phrases!
     * You can generate these using the {@link secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     * @since 2.6.0
    define('AUTH_KEY',         'XXXXXXXXXXXX');
    define('LOGGED_IN_KEY',    'XXXXXXXXXXXX');
    define('NONCE_KEY',        'XXXXXXXXXXXX');
    define('AUTH_SALT',        'XXXXXXXXXXXX');
    define('NONCE_SALT',       'XXXXXXXXXXXX');
     * WordPress Database Table prefix.
     * You can have multiple installations in one database if you give each
     * a unique prefix. Only numbers, letters, and underscores please!
    $table_prefix  = 'mod155_';
     * For developers: WordPress debugging mode.
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
     * For information on other constants that can be used for debugging,
     * visit the Codex.
     * @link
    define('WP_DEBUG', false);
    /* Multisite */
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', '');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    define('NOBLOGREDIRECT', '' );
    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');
    /* That's all, stop editing! Happy blogging. */
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
        define('ABSPATH', dirname(__FILE__) . '/');
    /* Fixes "Add media button not working", see */
    define('CONCATENATE_SCRIPTS', false );
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    That is really annoying and is obviously lowering the conversion rate of the main website (because all the trafic is redirected to homepage no matter what)

    Could you help me solve this? I have all access across the whole website / database, so I can try anything.

    Thanks in advance,


    Hi Maxime,

    it seems that part of the request goes missing when you try to access Have you enabled a different redirect option in the plugin settings, for example the 301 WordPress redirect after removing the .htaccess rules from the .htaccess file?

    One thing you could try is to slightly alter the .htaccess redirect inserted by Really Simple SSL, replacing this line:

    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]


    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    There is a slight difference in the way $1 and {REQUEST_URI} handle redirects which seems to affect multisites. Can you try if that resolves your issue?



    Hey Mark, thanks for your quick answer.

    So, I tried disabling 301 WordPress redirect, which didn’t seemed to have any effect, I re-enabled it.
    I then replaced the line in .htaccess, didn’t worked either…

    Are we clear that on a wordpress multisite the .htaccess file is still at the same place as usual at the root of the folder in FTP?


    In the Google Chrome console, it appears that when I try to load a subpage, there is first a 301 error, and then a 302.

    Also, if I set permalinks to plain, and try to access the page via its page ID, it works normally.


    Yes, that’s the correct .htaccess file. It could be possible that this is caused by something else than Really Simple SSL, especially since setting the permalinks to plain does work. Does the issue persists with all redirect options disabled? You could also try to press the ‘Deactivate and keep SSL’ button in the settings tab. That will have the same effect as disabling all redirects. If the issue persists after disabling all redirects, it’s possible that a security plugin is causing this issue. Some security/bot blocking plugins have options to redirect requests to the homepage.

    Really Simple SSL only adds a 301 redirect, if the 302 redirect is redirecting to the homepage it’s definitely not caused by Really Simple SSL. Check your security plugins and hosting/CDN redirect rules if you use any.



    Actually, I didn’t realized that when I tested with plain permalinks, I did differently: I copy pasted the url (I was typing it while testing before).

    I get it and I am now fully able to replicate the error : It only happens when “www.” is missing.

    If I type or paste the url with (thus being automatically properly set to, it goes right to the good page. If I type it without “www.”, then there is the error and it goes to homepage.
    How could I make the urls without “www.” be redirected to the correct url with “www.” ?

    • This reply was modified 2 years ago by maxime.

    You can redirect non-www requests to www by adding the following to your .htaccess file:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

    These rules should be added outside (above) the # WordPress and # Really Simple SSL blocks. For more information see


    Solved it ! 🙂
    So now there is that :

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [L,R=301]

    Do I still need this ? Or is it redundant with the previous rule for https ?

    # BEGIN rlrssslReallySimpleSSL rsssl_version[3.2.2]
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    # END rlrssslReallySimpleSSL

    You can leave the Really Simple SSL rules in, the non-www to www rules only redirect non-www requests to https://. The Really Simple SSL rules make sure that direct www requests will also be redirected to https://.


    Hello maxime,
    Hello Mark,
    I found this thread while searching for the same problem, although I’m not using really simple ssl. Since your description is vague about the actual problem and you found a workaround I thought that I also share my observations with wordpress mu and the redirect problem.

    I’m also using wordpress mu with multiple installations on different domains, some with www. prefix, most of it without www. It worked fine until some time ago I changed some setting in a site. The change process is the trigger, but may vary – so one time I was editing the theme settings via customize, another time I was changing the timezone. One time I was just changing the theme on a website.

    The last part also was replicable – so changing the theme to a standard default theme removed the redirects from all of the subpages. When changing back to the actual theme the redirection occurs again. I got two themes where this happens. When I delete the theme options in the wp_xxx_options sql db, this does not change anything.

    Maybe the hint with the theme helps somebody facing the same problem 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘WordPress Multisite redirects subpages to homepage’ is closed to new replies.

Join our mailing list - 8 Tips & Tricks in your inbox over the next 8 weeks!

Integrate with Really Simple SSL

Really Simple SSL offers a Free SSL Certificate from Let’s Encrypt. Do you want to integrate with Really Simple SSL as a hosting provider? Let us know!

Choose the answer that most closely resembles your proposed integration. Additional information can be entered below.
After sending the form. The pop-up will close automatically.