I have two different things I want to happen in the case of two different types of URI's but I can't seem to stop the second case from executing where the first case has already been accepted.
Here's an example:
abc.com
abc.com/asdf
abc.com/en/asdf
abc.com/zh-cn/asdf/asdf
Should all be directed to this RewriteRule:
RewriteRule ^(([a-z]{2})(-[a-z]{2})?)(/([a-z0-9-\./]*))?$ /index.php?lng=$1&tpl=$4 [QSA,L,NC]
Part 2:
abc.com/myadmin/
abc.com/myadmin/asdf
abc.com/myadmin/en/asdf
abc.com/myadmin/zh-cn/asdf/asdf
Should all be directed to this RewriteRule:
RewriteRule ^myadmin/(([a-z]{2})(-[a-z]{2})?)(/([a-z0-9-\./]*))?$ /myadmin/index.php?lng=$1&tpl=$4 [QSA,L,NC]
The way I've been attempting to acheive this is by stacking the conditions like this:
RewriteCond %{REQUEST_URI} !^/myadmin/
RewriteRule ^(([a-z]{2})(-[a-z]{2})?)(/([a-z0-9-\./]*))?$ /index.php?lng=$1&tpl=$4 [QSA,L,NC]
RewriteCond %{REQUEST_URI} ^/myadmin/
RewriteRule ^myadmin/(([a-z]{2})(-[a-z]{2})?)(/([a-z0-9-\./]*))?$ /myadmin/index.php?vlng=$1&tpl=$4 [QSA,L,NC]
But no matter what I do, both rules still execute. Maybe I'm doing this right and the secondary execute is occurring further down in the php templates, I'm not sure. I just need to know if what I have done so far looks good, ty all.