The influence of various rubbing parameters on the molecular reorientation of thin polyimide orienting layers, used to align liquid-crystal (LC) molecules within liquid-crystal displays, has been studied. For this purpose the optical phase retardation in the polymer layer, explicitly induced during the rubbing treatment, was determined. The observed rubbing-induced phase retardation can directly be related to a molecular orientation within the polymer orienting layer, as could be shown by infrared dichroism studies. Furthermore, it is found that the top of the polymer layer, directly contacting the rubbing cloth during the actual rubbing process, is almost instantaneously oriented to a certain maximum value as soon as the rubbing is started. Additional or stronger rubbing has no detectable influence on the orientation within the top layer. Increasing the rubbing density or the rubbing pressure only results in an increase of the penetration depth of the rubbing process, i.e., molecular reorientation occurs deeper within the layer. Experiments show that the penetration depth can be varied from less than 10 nm to more than 60 nm by variation in rubbing conditions. These findings are supported by surface second-harmonic-generation studies of LC monolayers deposited onto rubbed orienting layers and by infrared dichroism studies.