Being respectful and taking your dress cues from the locals – wearing tops over the shoulder and trousers below the knee – will ensure you travel with minimum hassle. When visiting mosques, cover your head and limbs with a headscarf and sarong (many mosques lend these out at the entrance).
Be proactive about your own safety. Treat overly friendly strangers, both male and female, with a good deal of caution. After dark, take taxis and avoid walking alone in quiet or seedy parts of town.
Zafigo (http://zafigo.com) is a local website that focuses on travel for women.