RE: Head scratcher - child htaccess issue

<[email protected]> Tue, 3 Mar 2026 11:25:21 -0500
Newsgroups gmane.comp.apache.user
Message-ID <[email protected]>
------=_NextPart_000_0085_01DCAB00.6C5DAB60
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

I don=E2=80=99t have a rewrite log that I know of. Nothing in error.log, =
nothing in my debug.log, nothing shows up on console or networking =
except the 404. If I rename the root htaccess, I can pull up the files =
in the subdirectory. If I rename the subdirectory htaccess that has the =
htpasswd requirement, I still get a 404. Weird

=20

From: Frank Gingras <[email protected]>=20
Sent: Tuesday, March 3, 2026 11:15 AM
To: [email protected]
Subject: Re: [users@httpd] Head scratcher - child htaccess issue

=20

=20

=20

On Tue, Mar 3, 2026 at 10:57=E2=80=AFAM <[email protected] =
<mailto:[email protected]> > wrote:

Standard vhost setup on Cpanel for almalinux

Root htaccess:

Options -Indexes=20

=20

# BEGIN WordPress Multisite

# Using subdomain network type

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteRule .* - [E=3DHTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteBase /

RewriteRule ^index\.php$ - [L]

=20

# add a trailing slash to /wp-admin

RewriteRule ^wp-admin$ wp-admin/ [R=3D301,L]

=20

RewriteCond %{REQUEST_FILENAME} -f [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^ - [L]

RewriteRule ^(wp-(content|admin|includes).*) $1 [L]

RewriteRule ^(.*\.php)$ $1 [L]

RewriteRule . index.php [L]

</IfModule>

# END WordPress Multisite

=20

From: Yehuda Katz <[email protected] <mailto:[email protected]> >=20
Sent: Tuesday, March 3, 2026 9:54 AM
To: [email protected] <mailto:[email protected]>=20
Subject: Re: [users@httpd] Head scratcher - child htaccess issue

=20

What is in your root directory .htaccess?

What is in your VirtualHost configuration?

=20

- Y

=20

On Tue, Mar 3, 2026 at 9:25=E2=80=AFAM Bball Scout <[email protected] =
<mailto:[email protected]> > wrote:

Wordpress multisite subdomain setup. I can't for the life of me figure =
out how to force apache to allow a child .htaccess for htpasswd =
authentication in a subdirectory of a WP multisite domain. Ie:

=20

/ [root WP server with its own .htaccess]

/directory1 [child .htaccess for htpasswd use]

=20

Any attempt to display a file in /directory1 apache gives a 404.=20

=20

I've tried rewrites in the parent .htaccess up the creek to no avail.=20

=20

Love suggestions.

=20

What does the rewrite log say, exactly?=20


------=_NextPart_000_0085_01DCAB00.6C5DAB60
Content-Type: text/html;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 15 (filtered =
medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	font-size:12.0pt;
	font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Aptos",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple style=3D'word-wrap:break-word'><div =
class=3DWordSection1><p class=3DMsoNormal>I don=E2=80=99t have a rewrite =
log that I know of. Nothing in error.log, nothing in my debug.log, =
nothing shows up on console or networking except the 404. If I rename =
the root htaccess, I can pull up the files in the subdirectory. If I =
rename the subdirectory htaccess that has the htpasswd requirement, I =
still get a 404. Weird<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div =
style=3D'border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in =
0in 0in'><p class=3DMsoNormal><b><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span><=
/b><span style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'> =
Frank Gingras &lt;[email protected]&gt; <br><b>Sent:</b> Tuesday, March =
3, 2026 11:15 AM<br><b>To:</b> [email protected]<br><b>Subject:</b> =
Re: [users@httpd] Head scratcher - child htaccess =
issue<o:p></o:p></span></p></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=3DMsoNormal>On =
Tue, Mar 3, 2026 at 10:57<span =
style=3D'font-family:"Arial",sans-serif'>=E2=80=AF</span>AM &lt;<a =
href=3D"mailto:[email protected]">[email protected]</a>&gt; =
wrote:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;margin-bottom:12.0pt'>Standard vhost =
setup on Cpanel for almalinux<br><br>Root htaccess:<o:p></o:p></p><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Options =
-Indexes <o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p><=
/o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'># BEGIN =
WordPress Multisite<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'># Using =
subdomain network type<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;IfModule=
 mod_rewrite.c&gt;<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>RewriteEngin=
e On<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>RewriteRule =
.* - [E=3DHTTP_AUTHORIZATION:%{HTTP:Authorization}]<o:p></o:p></p><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>RewriteBase =
/<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>RewriteRule =
^index\.php$ - [L]<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p><=
/o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'># add a =
trailing slash to /wp-admin<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>RewriteRule =
^wp-admin$ wp-admin/ [R=3D301,L]<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p><=
/o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>RewriteCond =
%{REQUEST_FILENAME} -f [OR]<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>RewriteCond =
%{REQUEST_FILENAME} -d<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>RewriteRule =
^ - [L]<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>RewriteRule =
^(wp-(content|admin|includes).*) $1 [L]<o:p></o:p></p><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>RewriteRule =
^(.*\.php)$ $1 [L]<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>RewriteRule =
. index.php [L]<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;/IfModul=
e&gt;<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'># END =
WordPress Multisite<o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p><=
/o:p></p><div style=3D'border:none;border-top:solid #E1E1E1 =
1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span><=
/b><span style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'> =
Yehuda Katz &lt;<a href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a>&gt; <br><b>Sent:</b> Tuesday, =
March 3, 2026 9:54 AM<br><b>To:</b> <a =
href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a><br><b>Subject:</b> Re: =
[users@httpd] Head scratcher - child htaccess =
issue</span><o:p></o:p></p></div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p><=
/o:p></p><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>What is in =
your root directory .htaccess?<o:p></o:p></p><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>What is in =
your VirtualHost configuration?<o:p></o:p></p><div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p><=
/o:p></p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>- =
Y<o:p></o:p></p></div></div></div></div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p><=
/o:p></p><div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>On Tue, Mar =
3, 2026 at 9:25<span =
style=3D'font-family:"Arial",sans-serif'>=E2=80=AF</span>AM Bball Scout =
&lt;<a href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a>&gt; =
wrote:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5=
.0pt'><div><div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'color:black'>Wordpress multisite subdomain setup. I can't for =
the life of me figure out how to force apache to allow a child .htaccess =
for htpasswd authentication in a subdirectory of a WP multisite domain. =
Ie:</span><o:p></o:p></p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'color:black'>&nbsp;</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'color:black'>/ [root WP server with its own =
.htaccess]</span><o:p></o:p></p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'color:black'>/directory1 [child .htaccess for htpasswd =
use]</span><o:p></o:p></p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'color:black'>&nbsp;</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'color:black'>Any attempt to display a file in /directory1 =
apache gives a 404.&nbsp;</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'color:black'>&nbsp;</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'color:black'>I've tried rewrites in the parent .htaccess up the =
creek to no avail.&nbsp;</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'color:black'>&nbsp;</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'color:black'>Love =
suggestions.</span><o:p></o:p></p></div></div></div></blockquote></div></=
div></div></div></blockquote><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>What does the rewrite log say, =
exactly?&nbsp;<o:p></o:p></p></div></div></div></div></body></html>
------=_NextPart_000_0085_01DCAB00.6C5DAB60--