You don't need to use mod_rewrite here, just use: FallbackResource /site1/index.php DirectoryIndex /site1/index.php
On Wed, 21 Sept 2022 at 16:37, Mark Leisher <mleis...@cs.nmsu.edu> wrote: > I hope this is the right list to bring things like this up. > > I'm running into a rewrite loop problem with a WordPress .htaccess file > that might be related to the httpd version, but I don't see anything > relevant searching online yet. > > I have two systems, CentOS (httpd 2.4.6) and Almalinux (httpd 2.4.51), > running web servers with exactly the same configuration. The only > difference is the server on Almalinux sends PHP files to php-fpm > (ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/wpsites/$1). > > On CentOS, no rewrite loops occur. > > On Almalinux: > 1. Visiting https://wp.example.com/site1/ produces an endless rewrite > loop (see below). > 2. Visiting https://wp.example.com/site1/index.php works correctly. > > Any help appreciated! > > ------------------------------------------------------------------ > > Default WordPress 6.0.2 .htaccess file on both systems in /wpsites/site1/: > > <IfModule mod_rewrite.c> > RewriteEngine On > RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] > RewriteBase /site1/ > RewriteRule ^index\.php$ - [L] > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule . /site1/index.php [L] > </IfModule> > > CentOS rewrite log entries > -------------------------- > strip per-dir prefix: /wpsites/site1/ -> > applying pattern '^index\\.php$' to uri '' > strip per-dir prefix: /wpsites/site1/ -> > applying pattern '.' to uri '' > pass through /wpsites/site1/ > strip per-dir prefix: /wpsites/site1/index.html -> index.html > applying pattern '^index\\.php$' to uri 'index.html' > strip per-dir prefix: /wpsites/site1/index.html -> index.html > applying pattern '.' to uri 'index.html' > rewrite 'index.html' -> '/site1/index.php' > trying to replace prefix /wpsites/site1/ with /site1/ > strip per-dir prefix: /wpsites/site1/index.php -> index.php > applying pattern '^index\\.php$' to uri 'index.php' > pass through /wpsites/site1/index.php > > Almalinux rewrite log entries (repeats ad infinitum) > ---------------------------------------------------- > strip per-dir prefix: /wpsites/site1/ -> > applying pattern '^index\\.php$' to uri '' > strip per-dir prefix: /wpsites/site1/ -> > applying pattern '.' to uri '' > pass through /wpsites/site1/ > strip per-dir prefix: /wpsites/site1/ -> > applying pattern '.*' to uri '' > strip per-dir prefix: /wpsites/site1/ -> > applying pattern '^index\\.php$' to uri '' > strip per-dir prefix: /wpsites/site1/ -> > applying pattern '.' to uri '' > pass through /wpsites/site1/ > > -- > Mark Leisher > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > >