North towards Rabat, Casablanca
You can hitch in this direction from the very ornate roundabout at the east end of the city centre. It is a few hundred meters back from the beach.
Walking east towards the Casablanca and Rabat roundabout from the city centre, take a right instead of going straight. A couple of hundred metres down you will reach another roundabout. Here you must turn left (signposted "Marrakesh"), and then proceed for another kilometer to the outskirts of the town. This leads to the N7 motorway which goes to Marrakesh.
For going towards Safi, Essaouira, Agadir, and Western Sahara, you can get a ride with a Marrakesh-bound vehicle to the village of Sidi Smay, where the N7 motorway meets the N1.