We put a rug in our bathroom recently, and it kept slipping out of place. My husband came up with a brilliant way to keep the rug secure. He got a roll of velcro from the hardware store and used that to fasten the back of the rug to the carpet. Here is the type of velcro he used. The rug stays in place, and you can still remove it to clean the floor beneath. Hurray for flashes of domestic genius!
I imagine this method would also work on tile or laminate floors. Put a small piece of the velcro down in a hidden spot for a couple days, and make sure you can remove it without damaging the flooring.