Fixed issues relating to mod_rewrite

mod_rewrite use is now "detected".