Link to home
Start Free TrialLog in
Avatar of MeridianManagement
MeridianManagementFlag for United States of America

asked on

Create an exception to a mod_rewrite using rewritecond

Okay, so I have this mod rewrite that checks to see if a folder or file exists, then if not, converts the URL into a string that gets sent to index.php. This is working great, I just want to create an exception that when it detects anything with /wp as in /wp/category/ or /wp/about, pretty much anything that starts with /wp, it will not execute the rule. Below is the version that works and the versions I tried to do.
// this works
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
 
#SEFU
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php?url=%{REQUEST_URI} [L,NE]
 
// this is my attempt that didn't work
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
 
#SEFU
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/wp/
RewriteRule .* index.php?url=%{REQUEST_URI} [L,NE]

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of caterham_www
caterham_www
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MeridianManagement

ASKER

thank you!!