Detect if its first time that user accesses the page
For authenticated users you can use a table where you write a record for each user who visits a page; in the case there isn't a record for the currently logged-in user, you create the record, and then redirect the user.

For the anonymous users, you can register the IP from which they connect, and remove the record after X hours, as the same IP can be used from different users, especially from users with a dynamic IP.