multisite htaccess rules for existing files / directories not working
-
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.
- The topic ‘multisite htaccess rules for existing files / directories not working’ is closed to new replies.