A CSRF/XSRF can be prevented using a number of techniques.
One of the technique is to use a token unique to the client session with every request being sent by the client to the server; which is being validated on the server side. If the request token and the token on the server side matches, the request is allowed to enter the application and if it does not it is not allowed to enter. Thus a CSRF attack would be detected.
Though this idea behind the technique is very clear to me, I am not sure about how URL rewriting could help prevent a CSRF attack? Can security gurus throw some light on this?