We are concerned with the existence of global and blow-up solutions for the semilinear heat equation with variable exponent u t - Δ u = h ( t ) f ( u ) p ( x ) in Ω×(0 ,T) with zero Dirichlet boundary condition and initial data in C 0 ( Ω ) . The scope of our analysis encompasses both bounded and unbounded domains, with p ( x ) ∈ C ( Ω ) , 0 < p - ≤ p ( x ) ≤ p + , h∈ C(0 ,∞), and f∈ C[0 ,∞). Our findings have significant implications, as they enhance the blow-up result discovered by Castillo and Loayza in Comput. Math. App. 74(3), 351-359 (2017) when f( u)= u.