• Hi,
    TWo weeks ago a support agent of my hosting company helped me with two things:
    – updating PHP to 7.x
    – and installing SSL
    Shortly afterwards I noticed that my multisite still shows the start page and the admin section, but all the subsites give a 404. I have reasons to believe it’s the .htaccess

    AddHandler application/x-httpd-ea-php74 .php .php5 .phtml
    
    RewriteOptions inherit
    RewriteEngine on
    #Header set content-Security-Policy: upgrade-insecure-requests
    
    # 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]
    </IfModule>
    # END WordPress
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
    </IfModule>
    

    Do you see anything in particular that can cause the problem? If no solution cab be found, I have to rebuild the whole thing.

    Kind regards

    Hans
    Hans

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

Viewing 1 replies (of 1 total)
  • You really want to run multisite WordPress from the root directory of an Apache based Linux powered webserver…

    If it was me…

    I’d delete the whole mess and start over…

    This time I’d build the WordPress into a subdirectory called WordPress then get that single site working perfectly as if your WordPress was running from webroot itself…

    Here are the directions for installing WordPress into a subdirectory and have it run as if it was installed in Root.

    https://wordpress.org/support/article/giving-wordpress-its-own-directory/

    Or else I’d install my WordPress in webroot itself and forget all about running from any subdirectory.

    Once you get the WordPress installed and running as if it was installed in webroot or actually installed in webroot…

    You’ll want your domain without the ‘www’ to bring up the site… then you’ll want the site to canonize to the domain itself without the ‘www’… In other words… if you type the domain with www you’ll then want WordPress to switch to the domain without the ‘www’. There are very good reasons for this.

    WordPress will try to create that htaccess to do that for you. If it can’t do that for you then it will tell you what you need to put into htaccess.

    I want you to go into Dashboard –> Settings –> Permalinks and set the Permalinks to something other than the plain old default settings.

    Play around with your WordPress for a while… You’ve built something right cool… enjoy it.

    When you’ve had some fun and are ready to build this multisite figure out what you need to get the encryption cert running and configure that. That may be as easy as making sure your CP knows about the cert and your site addresses under the General Settings are changed to https… Bluehost probably has great documentation to get that SSL cert running… Avoid any htaccess solutions unless absolutely necessary.

    Play around a bit more then…

    https://wordpress.org/support/article/create-a-network/

    This should be pretty straight forward this time… You’ve already configured all the tricky stuff back when you started over and it was still a single site… The network should be a breeze.

    I’d also caution you on the webserver OS… forget Windows… Some flavor of Linux is what you want.

    And you’ll want Apache… No IIS and you don’t want Nginx as a webserver… They can work for you but the keyword is ‘work’… You want all this stuff to be seamless… that’s Apache… everything else requires clever workarounds. Apache is your friend!

Viewing 1 replies (of 1 total)

The topic ‘.htaccess tweeking broke multisite’ is closed to new replies.