I'm trying to write a couple rules that will be dependent on the number of subdirectory levels present in a url. I have one rule that works for part of what I want, and another for the other part, but the cause conflicts with each other.
The rules and what they do:
This rule would take a URL like this: website.com/base/{WILDCARD}
and forward it to this: website.com/{WILDCARD}
RewriteRule ^base/(.*)$ /$1 [L,NC,R=301]
This rule would take a URL like this: website.com/base/{WILDCARD}/{WILDCARD2}
and forward it to this: website.com/{WILDCARD2}
RewriteRule ^base/([^/]+)/(.*)$ /$2 [L,NC,R=301]
These rules should only go into effect if "base" is in the URL
any help is greatly appreciated!