I am setting up a development environment with XAMPP on Windows. Apache version is 2.4.17.My development url is www.hagertyforjudge.dev, also accessible at hagertyforjudge.dev. I am trying to solve a mystery about getting a 301 redirect when I don't think I've set up anything on the server side that would call for it. Here are the relevant lines from httpd-vhosts.conf:NameVirtualHost *:80<VirtualHost *:80>    DocumentRoot H:/xampp2015/htdocs/hfj.dev    ServerName www.hagertyforjudge.dev    ServerAlias hagertyforjudge.dev    <Directory H:/xampp2015/htdocs/hfj.dev>    AllowOverride All    Require all Granted    </Directory></VirtualHost>I have not changed the default setting for UseCanonicalName, so it should be off (though it shouldn't matter, I don't think, for my issue).There is no .htaccess file in the site directory.Here are the lines from my hosts file that enable me to access this fake site in my browser:127.0.0.1 hagertyforjudge.dev127.0.0.1 www.hagertyforjudge.devI can access the site fine with any browser (both at hagertyforjudge.dev and at www.hagertyforjudge.dev), and in fact I was able to set up WordPress. I did so by visiting www.hagertyforjudge.dev. That URL got baked into the WordPress database (as 'site_url' and 'home' in the 'options' table). So far so good.Here's what I don't understand: If I visit hagertyforjudge.dev in my browser, I get a 301 redirect to www.hagertyforjudge.dev. Here is all of the request and response information, according to FireFox's dev tools (Chrome's dev tools give the same info):Request URL: http://hagertyforjudge.dev/Requet method: GETRemote address: 127.0.0.1:80Status Code: 301 Moved PermanentlyVersion: HTTP/1.1Request headers:Host: hagertyforjudge.devUser-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:44.0) Gecko/20100101 Firefox/44.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflateCookie: wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_8b3181539def2da5a4654e12bb9d4938=bhagerty%7C1455596780%7C662a3e414d01c0b773a41027df5f3da8; wp-settings-time-1=1455423988Connection: keep-aliveResponse headers:Connection: Keep-AliveContent-Length: 0Content-Type: text/html; charset=UTF-8Date: Sun, 14 Feb 2016 04:34:24 GMTKeep-Alive: timeout=5, max=100Location: http://www.hagertyforjudge.dev/Server: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.14X-Pingback: http://www.hagertyforjudge.dev/xmlrpc.phpX-Powered-By: PHP/5.6.14I did not tell Apache to do a 301 redirect. (Per this guy's discussion of redirection, the ServerAlias setting in the VirtualHost file is internal to Apache and does not generate a 301 or 302 redirect). I don't have an .htaccess file that would cause a 301 redirect.So How can a 301 redirect be happening? It has to come from Apache, right? But I don't think I've set up a 301 redirect in Apache. I really appreciate any insight you might have.
Why am I getting a 301 redirect when I haven't told Apache to give one? Can WordPress push a 301 redirect?
apache;301 redirect