A quick note about WAMPserver Virtual Hosts and .dev

So, because I’m a bloody heathen I do all my development in a Windows environment using the WAMPserver stack (yes, I know, put your crosses and garlic away, please!) which can make testing new things that have a very Mac and Linux driven approach a little… trying…

At the moment I’m starting to branch into looking at more open source MVC frameworks, having spent the last couple of years picking up .net MVC, and I’ve recently been getting into Laravel. Having spent a bit of time researching, I decided to take the plunge and start to transfer a current project over to this framework to see how I got on.

Needless to say, the steps to get this working on Windows are a bit interesting, but having got it all set up and working a treat (I’ll blog about my steps in the future) I started looking at how I could set things up so that I could just hit up http://laravel.dev in my browser, rather than http://localhost/path/to/laravel/project/public/index.php. On Mac, there looks like there’s a nifty app called Valet which can handle all this, and Laravel can run it’s own host but, hey; I’m on Windows and running WAMP.

So, I set up a virtual host to point laravel.dev to the required folder and… it didn’t work. After spending a while beating my head against a wall, trying to figure out why, I came across this little nugget – the .dev domain is now a thing that’s owned by Google and Chrome browser will ALWAYS try and push calls to URL’s using it over the web, instead of looking locally. Thanks, Chrome.

So, long story short, don’t use .dev. This seems to be something that the community at large seems to have picked up on over the last couple of years but it’s news to me. If it’s news to you, hopefully you’ll find this info helpful.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s