wget and rename

I want to download xyz.php to abc.php and save it in the directory mentioned.

wget -directory-prefix=/usr/local/apache/htdocs/ http://somesite.com/xyz.php

This command will save the file as xyz.php but the following does not work...

wget -directory-prefix=/usr/local/apache/htdocs/abc.php http://somesite.com/xyz.php

You need to direct your output to a defined file, like so using the -O option:

wget -directory-prefix=/usr/local/apache/htdocs -O abc.php http://somesite.com/xyz.php