[wp-trac] [WordPress Trac] #20746: Accessing non-existing theme folder in Network install gives 500 error
WordPress Trac
noreply at wordpress.org
Wed Mar 7 03:43:10 UTC 2018
#20746: Accessing non-existing theme folder in Network install gives 500 error
-------------------------------------+-----------------------------
Reporter: arkimedia | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future Release
Component: Rewrite Rules | Version: 3.3.2
Severity: normal | Resolution:
Keywords: needs-testing has-patch | Focuses: multisite
-------------------------------------+-----------------------------
Comment (by dchenko):
But this does not simply remove the question markâyou're removing the
capturing parentheses and changing the $2 to a $1, which makes the string
"+/" required as part of the URL in front of wp-* even though it was
optional before.
Replying to [comment:16 wpmuguru]:
> Replying to [comment:15 jrfoell]:
> > Thanks Ron... I amended my comment to show the full .htaccess I'm
using.
> >
>
> In the full htaccess above the rewrite condition
>
> {{{
> RewriteCond %{REQUEST_URI} ^/wp-(content|admin|includes).*$`
> }}}
>
> will only be met if the requested path begins with `//`. The RewriteBase
directive tells the rewrite engine to start rewriting after the base
value.
>
> Secondly, that .htaccess isn't what I suggested to Pippin. What I
suggested was
>
> {{{
> RewriteCond %{REQUEST_URI} !^wp-(content|admin|includes).*$
> RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
> }}}
>
> Looking at the original rule it would probably be easier to remove the ?
from the original rule
>
> {{{
> RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
> }}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/20746#comment:43>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list