A simple phase function for a diffractive axicon to allow generation of a quasi-Bessel beam with a uniform axial intensity profile is reported. By adding the new exponential phase function for the diffractive axicon, we theoretically show that a quasi-Bessel beam with a uniform axial intensity profile can be generated without amplitude oscillation or energy loss. We apply this spatial phase function to a spatial light modulator, illuminated by a fundamental Gaussian laser beam, and produce a quasi-Bessel beam with a long, uniform axial intensity profile, which is in very good agreement with theoretical calculation. Dependence of the phase parameters on the axial intensity profile and their optimization are discussed.