.htaccess rewrite folder exception
snippet in htaccess

.htaccess rewrite folder exception

user1037

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^/(admin|css|js)/
RewriteRule . - [S=3] #skip the next 3 rules if the RewriteCond match

RewriteRule ([^/]*)/?$ index.php?page=$1 [NC,L,QSA]
RewriteRule ([^/]*)/([^/]*)/?$ index.php?&parent=$1&page=$2 [NC,L,QSA]
RewriteRule ([^/]*)/([^/]*)/([^/]*)/?$ index.php?grandparent=$1&parent=$2&page=$3 [NC,L,QSA]

.htaccess rewrite folder exception

user3534

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^/(admin|css|js)/
RewriteRule . - [S=3] #skip the next 3 rules if the RewriteCond match

RewriteRule ([^/]*)/?$ index.php?page=$1 [NC,L,QSA]
RewriteRule ([^/]*)/([^/]*)/?$ index.php?&parent=$1&page=$2 [NC,L,QSA]
RewriteRule ([^/]*)/([^/]*)/([^/]*)/?$ index.php?grandparent=$1&parent=$2&page=$3 [NC,L,QSA]