I'm using django, nginx and apache. After I access my website having a URL (e.g., http://www.foo.com/) what seems during my browser address may be the Ip with admin appended (e.g., http://123.45.67.890/admin/). After I access the website by IP, it's rerouted not surprisingly by django's web addresses.py (e.g., http://123.45.67.890/ -> http://123.45.67.890/accounts/login/?next=/)

I must possess the title URL act exactly the same way because the IP. Where must i be searching to achieve this?

Have you got virtual domain names?
If that's the case, your domain title as well as your ip might be offered in a different way.