Photographing fireworks does not have to be very tough if one plan well and executes the plan well. It is always a good idea to scout the area before hand and understand the lay of the land and the overall scheme of things. Pick a spot to shoot, asses where the other sources of lights are likely to come in from, be street lamps or other sources. Also a great idea is to reach the spot well ahead of time and maybe have the camera set to the parameters one wants to start out from. Ideal world, do this when there is still light, before dark. It is good to know your camera well and the adjustments and the mechanisms since one is likely to be working in the dark.
It is critical to carry the right equipment, start with a small flashlight as one is operating in the dark and it could come in handy, be it to check the settings just in case you need to or to search for something fro the kit or to be prepared for one of those accidental drops of say a memory card. Carry a good tripod, this is very useful in shooting good quality steady pictures also it would help to have a remote release, so that one avoids all the shakes from both an unsteady hand the vibrations from the shutter. Carry enough lenses, always good to have a zoom lens in your camera kit.
Settings on the camera are equally crucial, shoot in RAW format as this allows for maximum flexibility post shoot for image enhancement and editing, also because it captures true images as is. Position is critical, it is better to be at a distance away from the fireworks, the images capture the overall fireworks and mood better. An ideal start will be at a focal ranging from f/8 to f/16 with an ISO of maybe 100 and exposure of two to ten seconds, or one could start with a focal length of f/11 ISO of 100 and an exposure time of half a second. Quickly analyse the first few photographs and readjust.
Shoot many pictures as this come in handy later at post shoot editing and enhancement phase. When shooting rockets use the remote release and keep the exposure from the time the rocket is fired and the whole firework in the sky fades away. Be aware of the other sources of light be it street lamps or other sources for they are likely to be blurbs in the images, though they can be addressed and rectified in the post shoot image enhancements stages. Before the shoot have a broad idea or theme or story in mind and frame the images accordingly, it is a good idea to add other components from time to time, could be the overall landscape, or people.
When one scouts the area, look for objects or elements in the area that one would like to have a back drop or illuminated by the fireworks, if one has such elements in mind shoot a series of those objects at different stages of the fireworks and put them together. Also be open to experimenting with backgrounds in the image editing stage for some results ranging from quirky to fabulous.
All in all shooting fireworks after dark can be a fun experience, as much as one wants to have the thumb rules and guiding principles in mind, feel free to experiment and explore the results could always surprise you and one might just have a master piece in hand.