Can anybody write code for me?
Many of the rewrite code snippets posted in this thread to what you have asked.
They're not working due to the server configuration. To solve your problem, you now need to be focussing your attention on ascertaining what that problem is.