• I’m having problems getting a multisite installation (which is live) cloned to localhost and working there. I’m on Windows 10, using Laragon / Apache.

    I seem to be having problems with the .htaccess rewrites which pass requests for non-existent directories (e.g. /about/) through to index.php. I’m seeing the home page but /about/ gives an Apache 404.

    These seem to be the key rules here:

    RewriteCond %{REQUEST_FILENAME} !-f [OR]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^ – [L]

    Presumably /about/ is falsely being seen as an existing directory, the last line passes the request through. But the directory doesn’t exist, so I’m getting a 404.

    If I comment the above lines out, things seem to be working – even requests to existing files in admin, e.g. /wp-admin/post-new.php

    So I’m working with this for now. I’m just wondering why this is happening, as I assume not having the above lines could cause issues at some point.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have no idea what Laragon is but I won’t run a multisite on anything but Xnix boxen with Apache.

    You should actually be able to run any htaccess directive in the Apache’s http.config file though by consulting the Apache docs if that would help you out. So possibly that section you rem’d out could be run from config!

    Thread Starter Steve Taylor

    (@gyrus)

    Hi, Laragon is a XAMPP-like dev environment for Windows. I can appreciate not using Windows for production, but I’m currently stuck with a Windows laptop for local dev and I’ve not heard of anything that might impact multisite per se in those terms. I’m running Apache.

    Anyway, it seems to be working with those lines commented out. It just seemed worthwhile seeing if anyone knew why that might be, in case I hit other issues along the way without those lines. I’ll post if I find anything.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘multisite htaccess rules for existing files / directories not working’ is closed to new replies.