this only seems to work on apache servers, so checking for apache before doing this new rewrite stuff