RE: Head scratcher - child htaccess issue

<[email protected]> Tue, 3 Mar 2026 10:57:12 -0500
Newsgroups gmane.comp.apache.user
Message-ID <[email protected]>
------=_NextPart_000_007C_01DCAAFC.7E1A0FF0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

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]>=20
Sent: Tuesday, March 3, 2026 9:54 AM
To: [email protected]
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.


------=_NextPart_000_007C_01DCAAFC.7E1A0FF0
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>Standard vhost setup on Cpanel =
for almalinux<br><br>Root htaccess:<br><br><o:p></o:p></p><p =
class=3DMsoNormal>Options -Indexes <o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal># BEGIN =
WordPress Multisite<o:p></o:p></p><p class=3DMsoNormal># Using subdomain =
network type<o:p></o:p></p><p class=3DMsoNormal>&lt;IfModule =
mod_rewrite.c&gt;<o:p></o:p></p><p class=3DMsoNormal>RewriteEngine =
On<o:p></o:p></p><p class=3DMsoNormal>RewriteRule .* - =
[E=3DHTTP_AUTHORIZATION:%{HTTP:Authorization}]<o:p></o:p></p><p =
class=3DMsoNormal>RewriteBase /<o:p></o:p></p><p =
class=3DMsoNormal>RewriteRule ^index\.php$ - [L]<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal># add a =
trailing slash to /wp-admin<o:p></o:p></p><p =
class=3DMsoNormal>RewriteRule ^wp-admin$ wp-admin/ =
[R=3D301,L]<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>RewriteCond %{REQUEST_FILENAME} -f =
[OR]<o:p></o:p></p><p class=3DMsoNormal>RewriteCond %{REQUEST_FILENAME} =
-d<o:p></o:p></p><p class=3DMsoNormal>RewriteRule ^ - =
[L]<o:p></o:p></p><p class=3DMsoNormal>RewriteRule =
^(wp-(content|admin|includes).*) $1 [L]<o:p></o:p></p><p =
class=3DMsoNormal>RewriteRule ^(.*\.php)$ $1 [L]<o:p></o:p></p><p =
class=3DMsoNormal>RewriteRule . index.php [L]<o:p></o:p></p><p =
class=3DMsoNormal>&lt;/IfModule&gt;<o:p></o:p></p><p class=3DMsoNormal># =
END WordPress Multisite<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'> =
Yehuda Katz &lt;[email protected]&gt; <br><b>Sent:</b> Tuesday, March 3, =
2026 9:54 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><p class=3DMsoNormal>What is =
in your root directory .htaccess?<o:p></o:p></p><div><p =
class=3DMsoNormal>What is in your VirtualHost =
configuration?<o:p></o:p></p><div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal>- =
Y<o:p></o:p></p></div></div></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=3DMsoNormal>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]">[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><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:<o:p></o:p></span></p></div><div><p class=3DMsoNormal><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p></div><div><p =
class=3DMsoNormal><span style=3D'color:black'>/ [root WP server with its =
own .htaccess]<o:p></o:p></span></p></div><div><p =
class=3DMsoNormal><span style=3D'color:black'>/directory1 [child =
.htaccess for htpasswd use]<o:p></o:p></span></p></div><div><p =
class=3DMsoNormal><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p></div><div><p =
class=3DMsoNormal><span style=3D'color:black'>Any attempt to display a =
file in /directory1 apache gives a =
404.&nbsp;<o:p></o:p></span></p></div><div><p class=3DMsoNormal><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p></div><div><p =
class=3DMsoNormal><span style=3D'color:black'>I've tried rewrites in the =
parent .htaccess up the creek to no =
avail.&nbsp;<o:p></o:p></span></p></div><div><p class=3DMsoNormal><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p></div><div><p =
class=3DMsoNormal><span style=3D'color:black'>Love =
suggestions.<o:p></o:p></span></p></div></div></div></blockquote></div></=
div></body></html>
------=_NextPart_000_007C_01DCAAFC.7E1A0FF0--