Stack Overflow, still a developer’s best friend

Stack Overflow is a question and answer site for professional and enthusiast programmers. Wether you’re building websites, or writing apps, developers should know that Stack Overflow is still one...

StackOverflow

Stack Overflow is a question and answer site for professional and enthusiast programmers. Wether you’re building websites, or writing apps, developers should know that Stack Overflow is still one of the best sources for help. Over the past few years I’ve solved many problems with help from posts from experts on the site, today was the most recent example.

As we continue tweaking things after the move to our new domain I had an issue with the redirects from the old domain. When the switch was flicked to send users to the new site, it was a simple blanket 301 redirect from domain to domain. The problem with this is that techAU has a long list of sites and search results linking directly to posts. The user experience was broken when someone clicked a link and was simply taken to the new site. I guess they could search from there, but that’s certainly far from ideal.

In search for a solution, I scoured the internet for .htaccess redirect help, but after trying many suggestions, nothing was working. This morning I turned to Stack Overflow to ask my question, hoping the experts could help. I should have done this from the start, within minutes I had 2 solid replies. Better yet, after I tried their initial suggestions and still experienced errors, they were quick to reply with comments to suggest the root cause.

It turns out having .htaccess files that conflict isn’t a great thing. Thankfully that’s now resolved and if you stumble across a link to the old site, it now redirects to the new domain, complete with the direct link to the page. This is the user experience I was after.

A link from http://www.techau.tv/blog/review-d-link-2890al-wireless-modem-router/ now takes the user to http://techau.com.au/review-d-link-2890al-wireless-modem-router/

Having never moved a WordPress site to a new host and domain before, I can officially say it is a pain, but with the transition complete, I’m glad I did it. During the transition two important changes were made to simplify the domain address. First off I made a decision to drop the www from the address, while these weren’t required, they were in every link making it longer than it needed to be. The second was to drop the /blog subdirectory, there really wasn’t a good reason for it, so it had to go.

If you want to read up on my redirection problem and the solution, you can head to Stack Overflow – http://stackoverflow.com/questions/18284470/redirect-including-path-to-new-domain

If you’re a developer, I can’t recommend the site highly enough, it’s helped me today and plenty of times in the past.

More at http://stackoverflow.com

Image credit: Flickr user Stanley Moss.

Categories
Developer

This post is authored by techAU staffers. Used rarely and sparingly when the source decided to keep their identity secret, or a guest author who isn't seeking credit.