Two domains, one site, different pages served

I am currently working on a complex website that requires two different companies on two different domains to share the same website. I have just mananged to create a piece of php code to analyse the domain name typed in and redirect to the correct section of the site for that company. Awesome!

$url = $_SERVER['HTTP_HOST'];
if(strpos( strtolower($url), "site2" )!=FALSE) {
header('location:site2/index.php');
} else {
header('location:site1/index.php');
}

It is not often that code makes me happy.

Young Voters

The New Zealand Herald has an article today about first time voters this year.

http://www.nzherald.co.nz/section/1/story.cfm?c_id=1&objectid=10485396&pnum=0

The article is mainly focused around one person, and comes from a very left wing point of view. Parts of the article are very good, other parts leave a lot to be desired. Some particular comments:

On May 12, she’ll turn 18 and become one of the 190,000-195,000 New Zealanders who, by September 30, will have come of voting age since the 2005 general election. This year, roughly one in 15 (6 per cent) of eligible voters will be first-timers.

This is a large number, and has potential to (if they vote wisely) affect the election.

What do they care about? What will sway them? Will they bother to vote?

Maddy’s mind is already made up. “I’ll vote Green. I don’t know that much, but I just like the ideas. Freedom of speech… I think most kids from here will vote for them because they think it’ll mean legalising weed.”

This is a sad comment, although, it is probably quite true, a sad reflection of today’s youth. People should know who they are really voting for rather then just voting for a party because they are “cool”.

Bradford’s bill, passed into law last winter, reinforced Maddy’s Green leaning. So did the party’s campaign to raise (ideally abolish) minimum youth rates. At $13.50 an hour gross, Maddy knows she’s on good pay for her age, but she struggles to save. She’s reconciled to a student loan for the four-year bachelor of design course at Unitec she begins in March. Her parents, whose earnings disqualify her from a student allowance, will help but with fees of $5700 a year plus living expenses, Maddy expects to rack up around $40,000 of debt.

I believe that this will be one of the reasons that many young people will vote for left leaning parties. This is the culture that the youth of today are being brought up in.

“I don’t stress out about it. I do want to go overseas after, and you get interest when you go overseas, but I don’t want to hang around here until I pay it off.”

This is another issue. When people are becoming qualified they are immediately leaving. See wiping interest did not do much for keeping people in New Zealand, what is needed is a cultural shift. We need a culture that values and respects workers. I doubt that many people today would be strongly proud of their country, except on the rugby pitch.

But she knows of others who’ve been put off tertiary studies because of student loans.

I know of a few as well, but not many. I don’t think that the true figure will be very high.

Young people are often maligned as apolitical and apathetic, but Maddy says political engagement is more to do with parental role models.

Lessons on MMP at school (she wasn’t taught about the system), a free gig carrying political messages, and ads on the radio could reach more youth. Teenagers with parents who don’t care, she predicts, “will grow up and not care either; not because they’re teenagers but because they’ve never really talked about it, nobody’s shown them how it affects them directly. They can’t see how it changes things for you.”

Absolutely agree, unless politics is made “cool” and relevant todays youth few will be interested. 6% of the population maybe newly able to vote, but how many will vote? The youth could really turn this election on its head.

New Year, New Website

I have just rolled out a complete overhaul of my website.

The changes in summary:

New:

  • Blog comments are back – provided I don’t get too much spam they will stay.
  • Java Web Start for software section
  • Text versions of many articles

Updated:

  • About me page
  • Articles portfolio
  • Website portfolio
  • Software portfolio
  • Photos

Deleted:

  • Homepage – Replaced with blog
  • Outdoor Activities
  • Links – Blogroll will be its replacement
  • Other stuff I can’t remember