0

I'm trying to setup a multisite environment with subdirectories and somehow I'm getting a "File not found." error every time I'm trying to access a .php file. It seems to work fine with all other file types and I tried to manually access files of different types in the same folder, so it seems to be something about that .php ending, that causes the problem. I had the same problem before with css files, which was fixed by adding define('CONCATENATE_SCRIPTS', false); to wp-config.php, but that didn't fix the problems for php files.

It works fine for the main site, but all the subsites have the issue. The url pattern I'm using to access the files is [website_name]/test/wp-content/index.php.

This is my htaccess file:

# 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

And this is my multisite section in wp-config.php:

define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'fresenia.man.poznan.pl');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
  • I had the axact same problem. My solution: edited/etc/apache2/sites-enabled/000-default.conf. It needs to look like: – vikrant zilpe Dec 20 '18 at 12:24
  • <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html <Directory /> Options FollowSymLinks AllowOverride all </Directory> <Directory /var/www/> Options FollowSymLinks AllowOverride all Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> – vikrant zilpe Dec 20 '18 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.