Visit on a desktop computer and then on an iPhone or iPod touch.

When you visit it on your mobile phone it displays a mobile version of the desktop page, but it is not a redirect as the URL is the same on both.

How would I do this on my website?

Is it .htaccess?