A study of Shakespeare's era is necessary to the understanding of his plays. Volumes have been written by scholars on the subject, and are widely available. Articles on the Internet and the various "Dummie" and "Idiot" guides should be explored.
Useful information is also available in the "Shakespeare Line-by-Line" and "No Fear Shakespeare" series. Shakespeare's language is printed on the left page; the "translation" into modern English on the right. Footnotes and margin notes also contain explanation of word usage, customs, and practices of Elizabethan time which would likely be confusing to a 21st. Century reader.
By the Elizabethan era, plays were categorized as either a history, tragedy, romance, comedy, or pastoral. The essence of each is fairly self-evident, although we need to know that comedies almost always ended with a marriage scene.
Pastorals were peopled by simple, uneducated country folk, or higher class persons who escaped their urban lives and disguised themselves as shepherds or farmers. The "rustics" were often seen as purveyors of life's truths, and "taught" the more noble classes, disguised as one of their own. "As You Like It" contains elements of both Comedy and Pastoral.
"As You Like It" also explores the era's view of gender and homoeroticism. Female roles were played by boys with unchanged voices and no facial hair. In many of the pastorales and comedies, "females" disguised themselves as males who fell in love with a female character. The situation occurs in this play to the point of absurdity.
Rosalind (a female character played by a male), disguises "herself" as Ganymede, the homosexual boy who serves as Cup Bearer to the God, Zeus. Ganymede (a gay male who is the "disguise" of a female character being played by a male), tutors the male character, Orlando, in the art of making love to a woman. Why? Because Rosalind (the female being portrayed by a male), is in love with Orlando and wishes him to pursue "her"!
The author also "toys" with the practice of his time of having a male character speak an epilogue at the end of a play. The purpose was to provide a kind of summation which brought all elements of the play together, and allowed applause to be requested. In "As You Like It", a female character is given this charge, whereupon "she" entreats the audience to approve of the play, regardless of their individual preferences. If the audience applauds, actors and audience alike can leave the world of the theater and return to their own everyday world, having benefited from their theatrical experience.
Without question, Shakespeare is poking fun at the male/female/homoerotic conventions of his time. He wishes us to understand that all human relationships are valid, that such may be "as you like it". All will bring joy; all will bring pain; all must be acknowledged, studied, accepted, and validated.
It can be argued that the place, time, and conventions of the Shakespearean/Elizabethan era are the very stuff of which "As You Like It" is constructed. The play could not have otherwise existed in its present form. Such would have been a great pity, given the joy it has brought audiences from Shakespeare's time to our own.