An exact analysis is presented for the diffusiophoresis and electrophoresis of a rigid elliptic cylindrical particle in a uniform applied field oriented arbitrarily with respect to its axis. The range of the interaction between the solute species and the particle surface is assumed to be small relative to the minimum dimension of the particle, but the effect of polarization of the diffuse species in the thin particle-solute interaction layer is incorporated. To solve the conservative equations governing the system, a slip velocity of fluid and normal fluxes of solute species at the outer edge of the thin diffuse layer which balance convection and diffusion of the solute species along the particle surface are used as the boundary conditions for the fluid domain outside the diffuse layer. Expressions for the migration velocity of the particle are obtained in closed forms for the cases of diffusiophoresis in a nonionic solute concentration gradient, diffusiophoresis in a concentration gradient of symmetric electrolyte, and electrophoresis in an external electric field. An interesting feature is found that the diffusiophoretic or electrophoretic velocity of the particle decreases with the reduction of the maximum length of the particle in the direction of migration. Also, the average migration velocity for an ensemble of identical, noninteracting elliptic cylinders with random orientation distribution is obtained for each case considered.