In my website i have allready made diffrent user groups and deny folders from annonymous users, but now i am trying to make it so that if a annonymous user or a user who belongs to a wrong group trys to access the wrong folder they will be redirected back to the previous page.
How is this normally done in php? Is this somethink that i can do with making some changes in IIS options or sould i make php login script for those folders?