I'm trying to have the modrewrite rules skip the directory vip
. I've tried a number of things as you can see below, but to no avail.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#RewriteRule ^vip$ - [PT]
RewriteRule ^vip/.$ - [PT]
#RewriteCond %{REQUEST_URI} !/vip
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
How do I get modrewrite to entirely ignore the /vip/
directory so that all requests pass directly to the folder?
As points of clarity:
Try putting this before any other rules.
RewriteRule ^vip - [L,NC]
It will match any URI beginning vip
.
-
means do nothing. L
means this should be last rule; ignore everything following. NC
means no-case (so "VIP" is also matched).Note that it matches anything beginning vip
. The expression ^vip$
would match vip
but not vip/
or vip/index.html
. The $
may have been your downfall. If you really want to do it right, you might want to go with ^vip(/|$)
so you don't match vip-page.html