Package: wordpress Version: 5.5.1+dfsg1-1 Severity: normal Debian wordpress allows for multiple instances of wordpress to be served from the same box by using config fragments in /etc/wordpress/config-<site>.php However, /usr/share/wordpress/.htaccess is not fragmented. This is a problem because permalinks, when enabled places the prefix base into the htaccess file. So the htaccess file for http://blog.example.com/ is
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> But the htaccess for http://www.example.com/my/site is <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /my/site RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /my/site/index.php [L] </IfModule> Which are completely incompatible, only one or other can work. There is actually a compatible .htaccess way of doing this, which is to eliminate the absolute path and use the ability of apache 2.4.16+ to use Alias relative htaccss rewrites, so the .htaccess file supporting both URLs becomes <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L] </IfModule> This still has the bug that all sites or none must use permalinks, but at least it allows multiple sites with different prefix directories. -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 5.8.0-2-686 (SMP w/1 CPU thread) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages wordpress depends on: ii apache2 [httpd] 2.4.46-1 ii ca-certificates 20200601 ii libapache2-mod-php 2:7.4+76 ii libapache2-mod-php5 5.6.30+dfsg-0+deb8u1 ii libapache2-mod-php7.4 [libapache2-mod-php] 7.4.9-2 ii libjs-cropper 1.2.2-1 ii libjs-underscore 1.9.1~dfsg-1 ii mysql-client-5.6 [virtual-mysql-client] 5.6.30-1 ii php 2:7.4+76 ii php-gd 2:7.4+76 ii php-getid3 1.9.20+dfsg-1 ii php5 5.6.30+dfsg-0+deb8u1 ii php5-gd 5.6.30+dfsg-0+deb8u1 ii php5-mysql 5.6.30+dfsg-0+deb8u1 ii php7.4 [php] 7.4.9-2 ii php7.4-gd [php-gd] 7.4.9-2 ii php7.4-mysql [php-mysqlnd] 7.4.9-2 Versions of packages wordpress recommends: ii wordpress-l10n 5.5.1+dfsg1-1 ii wordpress-theme-twentytwenty 5.5.1+dfsg1-1 Versions of packages wordpress suggests: ii mysql-server-5.6 [virtual-mysql-server] 5.6.30-1 pn php-ssh2 <none> -- Configuration Files: /etc/wordpress/htaccess changed [not included] -- no debconf information