Many times working on staging projects on funny domain names i need to publish the website on different hosts to display previews , this is silly but needed , googling around i saw that many people use this weird approach , and is very simple to deploy .
add in your theme function at the first line ( just for simple reference ) this line that ignore the filters for redirection
<?php
/** where tu put it wp-content/themes/YUOR_THEME/functions.php */
remove_filter('template_redirect','redirect_canonical');
/* rest of you code */
?>
than , if , you need also to use different hostname in wp-admin than change the XXXXX_options.siteurl and XXXXX_options.home accordignly .