Over time the rand function should give you a 50/50 split even though in any short interval it won't be exactly 50/50.
Perhaps you should ask your instructor if there's any problem with using the rand?
If rand is giving you a 50/50 split consistently, it's not really random is it? (Yes I know that rand will most likely given a 50/50 in this situation.)
Honestly, if you want to be sure of a 50/50 there are few easy ways to do this and be fairly sure on even 50/50 split.
1) You could use memcache. Store a variable of true/false in the cache and on each page view just flip it and use that as your link criteria.
2) You could use a temp file. Write true or false to the file and check it on each page load. Use that to link to your criteria.
3) You could still use a temp file, but instead of writing to it, check for it's existence. If it exists, go to site 1 and delete it. If it doesn't, go to site two and create it.
However, technically it is possible to get two page loads at the same time, so a true 50/50 is still not possible with these methods. Honestly, this is just something that shouldn't be done with php.