What you need to do is make a temporary subdomain using an A record pointed to the new shared server. Call it something like testing.example.com
and point it to the new servers IP. Then ftp in, open or create an .htaccess
, and point the request to whatever folder it needs to run using something like following. We will assume for this example that it's a platform installed in a folder called "newapp":
RewriteEngine On
RewriteCond %{HTTP_HOST} ^testing\.example.com$ [NC]
RewriteRule ^(.*+)$ newapp/$1 [L,QSA]
If your app routes all via index.php
, you may have to edit the .htaccess
in the "newapp" folder as well to pick up the request (which is the $1
in the snippet above). In Wordpress for example, the line containing index would now look like this:
RewriteRule . index.php$1 [L]
The best part of setting it up this way is that you can leave the original running while you get the new online. Also you can bypass host subdomain or parking limits, do not need to utilize [restricted] addon domains, or use other "gui" style methods of attachment. When you go live you can just change the ^testing\.example.com$
part of the snippet into your live domain like so ^(www.)?example.com$
, change the example.com TLD A record, and shut down the old site.