Forum Replies Created

Viewing 3 replies - 16 through 18 (of 18 total)
  • this htaccess can perhaps be improved upon somewhat (eg. less ‘footprint’ from wildcard matches and value captures) in this use case as follows:

    www to non-www

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

    non-www to www

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

    and ONLY if using 100% HTTPS

    www to non-www

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

    non-www to www

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

    Error messages can be both confusing and misleading.

    Since you note that you have quite heavy traffic, perhaps you can increase the open-files-limit to more than 10,000 ??

    Indeed! FOr the OP and any future readers:

    The process to increase open_files_limit is different depending upon your OS…
    https://duntuk.com/how-raise-ulimit-open-files-and-mysql-openfileslimit (centos 6, and likely earlier)
    https://ma.ttias.be/increase-open-files-limit-in-mariadb-on-centos-7-with-systemd/

    Google is your friend… so is dba.stackexchange.com and https://community.spiceworks.com/databases and the like… hope you got your issue resolved =)

    You can try using an mu-plugin (all thanks to Sybre!)

    <?php
    /*
     * Plugin Name: Heartbeat Slowdown [Multisite module]
     * Plugin URI: https://hostmijnpagina.nl/
     * Description: Lower the heartbeat frequency to reduce http requests
     * Author: Sybre Waaijer
     * Author URI: https://cyberwire.nl/
    */
    
    function hmpl_slow_heartbeat( $settings ) {
        $settings['interval'] = 60;
        return $settings;
    }
    add_filter( 'heartbeat_settings', 'hmpl_slow_heartbeat' );

Viewing 3 replies - 16 through 18 (of 18 total)