You can add a RewriteRule
to your .htaccess
to instruct mod_rewrite
to stop processing any URI that begins with Staff/
or resolves to Staff
:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^/?Staff(/|$) - [END,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
In effect, this should be the same as a RewriteEngine Off
directive in a .htaccess
file in /Staff
.
Breaking down the new rule:
RewriteRule ^/?Staff(/|$) - [END,NC]
^/?Staff(/|$)
: The first argument of aRewriteRule
is a REGEX pattern to check against the path portion of requested URIs, in this caseStaff/Schedule/Schedu-Mod_Results_test.php
^
matches the very beginning of the URI path/?
matches whether or not a leading forward-slash is present (this is only necessary to compensate for old Apache servers – it isn’t needed in Apache 2+Staff
matches the literal stringStaff
(/|$)
matches either a forward-slash, or the very end of the URI path
-
: If the pattern is found in the URI path, the second argument specifies what to replace the entire URI path with. In this case-
indicates that the URI should not be modified.[END,NC]
: the third argument consists of boolean flags that further modify the rule.END
is similar to L (last), however indicates that this should be the very last rule processed within the context of the directory: if the pattern matches the URI, don’t process any subsequent rewrite rules OR rounds (thus eliminating any possibility of handing the request to WordPress)NC
(NoCase) makes pattern matching case-insensative.