I have searched on google and stackoverflow for a while, but didn't really found an answer to my question.
I want to redirect admin.domain.com to www.domain.com if there are no subdirectories or queries.
Examples that should redirect: https://admin.domain.com http://admin.domain.com https://admin.domain.com/
Examples that shouldn't redirect https://admin.domain.com/subdirectory/ https://admin.domain.com/?q=testquery
I really have no clue how to do this. I managed the trigger on subdomain, but it would also redirect if there are subdirectories.