Photonic crystals (PCs) have recently attracted considerable attention, with much effort devoted to photonic bandgap (PBG) control for varying the reflected color. Here, fabrication of a modulated one-dimensional (1D) anodic aluminum oxide (AAO) PC with a periodic porous structure is reported. The PBG of the fabricated PC can be reversibly changed by switching the ultraviolet (UV) light on/off. The AAO nanopores contain a mixture of photoresponsive liquid crystals (LCs) with irradiation-activated cis/trans photoisomerizable azobenzene. The resultant mixture of LCs in the porous AAO film exhibits a reversible PBG, depending on the cis/trans configuration of azobenzene molecules. The PBG switching is reliable over many cycles, suggesting that the fabricated device can be used in optical and photonic applications such as light modulators, smart windows, and sensors.