Mobile app version of vmapp.org
Login or Join
Rivera981

: How can I view my website (hosted with NAME.COM) using a shared IP? I have a website which is hosted with COMPANY 1 and the domain is registered with COMPANY 2. I want to change the hosting

@Rivera981

Posted in: #Dns #IpAddress #WebHosting

I have a website which is hosted with COMPANY 1 and the domain is registered with COMPANY 2.

I want to change the hosting from COMPANY 1 to COMPANY 3 and leave the domain registered with COMPANY 2.

To achieve this, I have setup hosting with COMPANY 3 and I have uploaded the website. This means that all I need to do is point the domain to the new hosting and then disable the old hosting however, firstly I need to view my website to make sure it is working. Is there a way to view the site using a shared IP?

I have tried using IPADDRESS~username however, this just takes me to a 404 page.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Rivera981

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sent6035632

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/ [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 in the snippet above). In Wordpress for example, the line containing index would now look like this:

RewriteRule . index.php [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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme