like said above. set a flag in the database when somone is viewing the page. the flag should have a timestamp associated w/ it.
when that user views another page remove any previous flag they had for another page.
whenever somone trys to access a page, you will need to first check if a flag exists for that page. if it does, then you need to check how long ago the flag was set(hence why i said you need a timestamp for each flag). if the flag was set say 15minutes ago or longer, then ignore the flag and and set a new one to allow the current user because if that old user has not been active for 15min, they likely are no longer viewing the page and have left the website. you decide how long this "timeout" period is.
this is no trivial task if your going to do it properly. if you dont really know what your doing, you might allow more than 1 person to view a page at the same time if you dont understand race conditions and all other possibilities.
why exactly do you need to allow only 1 person to view a page at a time? there may be a better, and easier solution to your problem. i would highly suggest trying to avoid having to do this unless your very confident of your capabilities.