Re: Head scratcher - child htaccess issue

Frank Gingras <[email protected]> Tue, 3 Mar 2026 11:14:51 -0500
Newsgroups gmane.comp.apache.user
Message-ID <CAOY50mvWwYRj4A36NFhuBORvBVzTPdz2dN1nrCs6UVvRL5oSBg@mail.gmail.com>
--0000000000007cc624064c210175
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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

> Standard vhost setup on Cpanel for almalinux
>
> Root htaccess:
>
> Options -Indexes
>
>
>
> # BEGIN WordPress Multisite
>
> # Using subdomain network type
>
> <IfModule mod_rewrite.c>
>
> RewriteEngine On
>
> RewriteRule .* - [E=3DHTTP_AUTHORIZATION:%{HTTP:Authorization}]
>
> RewriteBase /
>
> RewriteRule ^index\.php$ - [L]
>
>
>
> # add a trailing slash to /wp-admin
>
> RewriteRule ^wp-admin$ wp-admin/ [R=3D301,L]
>
>
>
> 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
>
>
>
> *From:* Yehuda Katz <[email protected]>
> *Sent:* Tuesday, March 3, 2026 9:54 AM
> *To:* [email protected]
> *Subject:* Re: [users@httpd] Head scratcher - child htaccess issue
>
>
>
> What is in your root directory .htaccess?
>
> What is in your VirtualHost configuration?
>
>
>
> - Y
>
>
>
> On Tue, Mar 3, 2026 at 9:25=E2=80=AFAM Bball Scout <[email protected]> wr=
ote:
>
> Wordpress multisite subdomain setup. I can't for the life of me figure ou=
t
> how to force apache to allow a child .htaccess for htpasswd authenticatio=
n
> in a subdirectory of a WP multisite domain. Ie:
>
>
>
> / [root WP server with its own .htaccess]
>
> /directory1 [child .htaccess for htpasswd use]
>
>
>
> Any attempt to display a file in /directory1 apache gives a 404.
>
>
>
> I've tried rewrites in the parent .htaccess up the creek to no avail.
>
>
>
> Love suggestions.
>
>
What does the rewrite log say, exactly?

--0000000000007cc624064c210175
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g=
mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Mar 3, =
2026 at 10:57=E2=80=AFAM &lt;<a href=3D"mailto:[email protected]">4seamer@g=
mail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D=
"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le=
ft:1ex"><div class=3D"msg5333730067158352343"><div lang=3D"EN-US" style=3D"=
overflow-wrap: break-word;"><div class=3D"m_5333730067158352343WordSection1=
"><p class=3D"MsoNormal">Standard vhost setup on Cpanel for almalinux<br><b=
r>Root htaccess:<br><br><u></u><u></u></p><p class=3D"MsoNormal">Options -I=
ndexes <u></u><u></u></p><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p><p =
class=3D"MsoNormal"># BEGIN WordPress Multisite<u></u><u></u></p><p class=
=3D"MsoNormal"># Using subdomain network type<u></u><u></u></p><p class=3D"=
MsoNormal">&lt;IfModule mod_rewrite.c&gt;<u></u><u></u></p><p class=3D"MsoN=
ormal">RewriteEngine On<u></u><u></u></p><p class=3D"MsoNormal">RewriteRule=
 .* - [E=3DHTTP_AUTHORIZATION:%{HTTP:Authorization}]<u></u><u></u></p><p cl=
ass=3D"MsoNormal">RewriteBase /<u></u><u></u></p><p class=3D"MsoNormal">Rew=
riteRule ^index\.php$ - [L]<u></u><u></u></p><p class=3D"MsoNormal"><u></u>=
=C2=A0<u></u></p><p class=3D"MsoNormal"># add a trailing slash to /wp-admin=
<u></u><u></u></p><p class=3D"MsoNormal">RewriteRule ^wp-admin$ wp-admin/ [=
R=3D301,L]<u></u><u></u></p><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>=
<p class=3D"MsoNormal">RewriteCond %{REQUEST_FILENAME} -f [OR]<u></u><u></u=
></p><p class=3D"MsoNormal">RewriteCond %{REQUEST_FILENAME} -d<u></u><u></u=
></p><p class=3D"MsoNormal">RewriteRule ^ - [L]<u></u><u></u></p><p class=
=3D"MsoNormal">RewriteRule ^(wp-(content|admin|includes).*) $1 [L]<u></u><u=
></u></p><p class=3D"MsoNormal">RewriteRule ^(.*\.php)$ $1 [L]<u></u><u></u=
></p><p class=3D"MsoNormal">RewriteRule . index.php [L]<u></u><u></u></p><p=
 class=3D"MsoNormal">&lt;/IfModule&gt;<u></u><u></u></p><p class=3D"MsoNorm=
al"># END WordPress Multisite<u></u><u></u></p><p class=3D"MsoNormal"><u></=
u>=C2=A0<u></u></p><div style=3D"border-right:none;border-bottom:none;borde=
r-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p c=
lass=3D"MsoNormal"><b><span style=3D"font-size:11pt;font-family:Calibri,san=
s-serif">From:</span></b><span style=3D"font-size:11pt;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<u></u><u></u></span></p></div><p class=3D=
"MsoNormal"><u></u>=C2=A0<u></u></p><div><p class=3D"MsoNormal">What is in =
your root directory .htaccess?<u></u><u></u></p><div><p class=3D"MsoNormal"=
>What is in your VirtualHost configuration?<u></u><u></u></p><div><div><p c=
lass=3D"MsoNormal"><u></u>=C2=A0<u></u></p></div><div><p class=3D"MsoNormal=
">- Y<u></u><u></u></p></div></div></div></div><p class=3D"MsoNormal"><u></=
u>=C2=A0<u></u></p><div><div><p class=3D"MsoNormal">On Tue, Mar 3, 2026 at =
9:25<span style=3D"font-family:Arial,sans-serif">=E2=80=AF</span>AM Bball S=
cout &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">4seamer@gma=
il.com</a>&gt; wrote:<u></u><u></u></p></div><blockquote style=3D"border-to=
p:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,2=
04,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><d=
iv><div><p class=3D"MsoNormal"><span style=3D"color:black">Wordpress multis=
ite subdomain setup. I can&#39;t for the life of me figure out how to force=
 apache to allow a child .htaccess for htpasswd authentication in a subdire=
ctory of a WP multisite domain. Ie:<u></u><u></u></span></p></div><div><p c=
lass=3D"MsoNormal"><span style=3D"color:black"><u></u>=C2=A0<u></u></span><=
/p></div><div><p class=3D"MsoNormal"><span style=3D"color:black">/ [root WP=
 server with its own .htaccess]<u></u><u></u></span></p></div><div><p class=
=3D"MsoNormal"><span style=3D"color:black">/directory1 [child .htaccess for=
 htpasswd use]<u></u><u></u></span></p></div><div><p class=3D"MsoNormal"><s=
pan style=3D"color:black"><u></u>=C2=A0<u></u></span></p></div><div><p clas=
s=3D"MsoNormal"><span style=3D"color:black">Any attempt to display a file i=
n /directory1 apache gives a 404.=C2=A0<u></u><u></u></span></p></div><div>=
<p class=3D"MsoNormal"><span style=3D"color:black"><u></u>=C2=A0<u></u></sp=
an></p></div><div><p class=3D"MsoNormal"><span style=3D"color:black">I&#39;=
ve tried rewrites in the parent .htaccess up the creek to no avail.=C2=A0<u=
></u><u></u></span></p></div><div><p class=3D"MsoNormal"><span style=3D"col=
or:black"><u></u>=C2=A0<u></u></span></p></div><div><p class=3D"MsoNormal">=
<span style=3D"color:black">Love suggestions.</span></p></div></div></div><=
/blockquote></div></div></div></div></blockquote><div><br></div><div>What d=
oes the rewrite log say, exactly?=C2=A0</div></div></div>

--0000000000007cc624064c210175--