I am not sure if you mean that joomla remains in the same web directory and it is just the domain name that is changing.
1. If it is then:
If you have mod_rewrite option turned on in joomla admin, try adding these rules to your htaccess file:
*change the somedomain to your actual domain
RewriteCond %{HTTP_HOST} ^somedomain.com.s1500_gridserver.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.somedomain.com.s1500_gridserver.com$
RewriteRule ^/?(.*)$ "http\:\/\/www\.somedomain\.com\/$1" [R=301,L]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
2. If you are moving it to another directory then make the neccessary changes in the configuration file, for logs and tmp with the new web root.