MediaWiki auto redirect to www

I was unable to find any information on this particular issue online. Essentialy, if you install media wiki to mywiki.com it will automaticly redirect to www.mywiki.com. I would much prefer using the url without the www so I poked around google and the media wiki docs trying to find the answer, with no luck.
I found that it will redirect to whatever is the primary address for the site as specified in the httpd.conf file for apache. so instead of this…

ServerAlias mywiki.com
ServerName www.mywiki.com

It would be this…

ServerAlias www.mywiki.com
ServerName mywiki.com

This is in the virtualhost section of the conf file.