Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

How to Access Same Website Locally and Non-locally?


  • Please log in to reply
4 replies to this topic

#1 fastpurplemedia

fastpurplemedia

  • Members
  • 6 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Doncaster
  • Local time:09:12 AM

Posted 04 June 2013 - 05:21 AM

Hello..
I'm working on a website locally using Xampp and I need to access the non-local site at the same time. The non-local site has a dedicated IP. Is there any way to open the non-local site (so I can copy and paste) while still viewing the local site? I thought about accessing it with the IP but it resolves to the domain name.

Thanks in advance.

 



BC AdBot (Login to Remove)

 


#2 Grinler

Grinler

    Lawrence Abrams


  • Admin
  • 43,568 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:USA
  • Local time:11:42 PM

Posted 04 June 2013 - 08:02 AM

This can be a pain in the butt. To solve this many developers give the dev site its own hostname. For example devel.example.com.

The other option is to open one browser (chrome) and use that on the main site. The change the c:\windows\system32\drivers\etc\hosts file and add a new line for the dev site. Then you open a different browser (ie) and use that on the dev site.

#3 andrew011

andrew011

  • Members
  • 1 posts
  • OFFLINE
  •  
  • Local time:09:12 AM

Posted 04 June 2013 - 08:28 AM

Do you want to access the source code of the "non-local" site? Can you be more specific as to what you want to "copy and paste"?  

Edited by Grinler, 04 June 2013 - 08:46 AM.
Removed unnecessary url


#4 fastpurplemedia

fastpurplemedia
  • Topic Starter

  • Members
  • 6 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Doncaster
  • Local time:09:12 AM

Posted 05 June 2013 - 02:58 AM

This can be a pain in the butt. To solve this many developers give the dev site its own hostname. For example devel.example.com.

The other option is to open one browser (chrome) and use that on the main site. The change the c:\windows\system32\drivers\etc\hosts file and add a new line for the dev site. Then you open a different browser (ie) and use that on the dev site.

 

Hello Grinler, I had tried your method before but its not working for me. :(



#5 Grinler

Grinler

    Lawrence Abrams


  • Admin
  • 43,568 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:USA
  • Local time:11:42 PM

Posted 05 June 2013 - 07:21 AM

It should. I use this all the time.

Try this. Close all browsers and add the line to your hosts file for the dev site. It should be in the following example form:

192.168.1.1 www.example.com

Obviously, change the ip and host name to your values.

Then save the hosts file. Open any browser and when you go to www.example.com, it should now be the dev site.

Let me know if that works. To reset back to the normal site, just close your browsers and edit the HOSTS file again and put a # before the ip address so it would look like

#192.168.1.1 www.example.com

Then close and save the hosts file and start a browser and you should be at your normal site.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users