A touch of Apache power

Recently I had a client that we had come up with an amazing domain name to help promote his local Extreme Pita franchise. The goal was to attract more schools & businesses as regular catering clients. The domain, we thought was clever and simply was extremepitacatering.com – to the point, and key word rich.

Well unfortunately head office didn’t think so. Honestly, it’s not my fault they didn’t register it in the first place. Apparently the franchisee can utilize the Extreme Pita name in their domain, but not other terms. We’re still not clear on this, but honestly don’t want to hold up additional actions around it either. So since the location is in North East Calgary, the decision was to make it simple and still relevant so we opted for extremepitane.com – in fact it’s even shorter, so good for a Twitter world.

The issue came about though in trying to figure out the fastest, easiest way to get the domains redirected without having to copy over code and not losing any (though minimal) search results. A nice Google search for .htaccess forward domain generated a nice lead on a forum. I read through the results and came up with the following solution.

RewriteEngine On
RewriteCond %{HTTP_HOST} extremepitacatering.com$
RewriteRule ^(.*)$ http://extremepitane.com/$1 [R=301,L]

It was so quick and simple and nice to do. Something I’ve never had the experience of doing on a Windows machine. The pure power of Apache is definitely something I won’t sacrifice for clients. Utilizing the power of mod_rewrite is even better, but that’s for another post. BTW, if you’re hungry, go visit Dan at extremepitane.com and tell him we sent you.

No Comments | Filed under Code Development, Searches