mydomain.com
is forwarded to www.mydomain.com
correct? Then mydomain.com/admin
wont work, everything mydomain.com
is forwarded.
If you want this behavior then you need to remove your forwarding at the DNS and do this kind of redirection (or not) at the application level.