Access subdomain on local machine in PHP

I have PHP source code of http://www.sitename.com. I can access it by using sub domain http://www.demo.sitename.com . I have copied all source code from live and stored it on my local machine (e.g. 192.168.15.24).

On local machine WAMP 2.0 is installed.

I have tried to run as following way, but those are wrong.
1. http://192.168.15.24/sitename/demo
2. http://demo.192.168.15.24/sitename/

How can I run the page http://www.demo.sitename.com from my local machine’s IP?

-------------Problems Reply------------

A quick hack that might help:

Open %windir%\system32\drivers\etc\hosts e.g. C:\windows\system32\drivers\etc\hosts in a text editor like notepad. Add a line with 192.168.15.24 www.demo.sitename.com. Now visiting www.demo.sitename.com will connect to your LAN IP instead.

Category:php Views:0 Time:2010-11-09
Tags: php .htaccess

Related post

  • Uploading MS Access records from local machine 2011-08-26

    I need a way of uploading MS Access records from a local machine to a MS Access database that is located on a web server. Ideally, I would use a simple VBA interface with an "Upload all new records" button, which would then connect the FTP (username,

  • How to add subdomain on local machine 2012-01-14

    I have modified my etc/hosts file (under Windows 7), so that www.example.com and demo.example.com both point at localhost. Unfortunately accessing demo.example.com, takes me to localhost's document root (which is logical). I want to change this to po

  • How to I copy a file from a computer that requires authentication to my local machine? 2010-07-07

    When I use: File.Copy(strRemoteFolder, strLocalFolder) I get an UnauthorizedAccessException with the following message: "Access to the path ... is denied." In .NET, how do I copy a file from a remote computer that requires authentication to my local

  • display images in local machines from a web server 2010-10-11

    My question is about accessing local machines' files from a webserver.. I have an intranet project that works on my network.. My project is about accessing the other local machines,then displaying images from that machines.. For example my project is

  • how to access a URI of a DTD file on my local machine? 2009-05-14

    i have a DTD file which i used to accessed through this link: http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd Now i want that i should be able to access this file on my local machine without any web access.I was using WebRequest to access this URI. Can

  • Accessing C# code hosted on US server from Local machine 2009-12-01

    I have recently created a website in asp.net with c# and hosted it on US server, Now my problem is I want to access its code from local machine, Is it possible to access the code of US server from my local machine? because when any changes suggested

  • Unable to access Windows Authentication controlled ASP.NET web site from browser on local machine..? 2010-08-19

    I have set up a web site on a Windows 7 machine (Application PC), and have configured it to use Windows Authentication. I have set up the User, and can access the site from a remote PC (Remote PC), logging in with the user name and password. My main

  • Access Local Machine Certificate Store in Java? 2010-08-31

    Is it possible to access certificates stored in the Local Machine store (rather than Current User) from a Java Servlet? I've tried using the MSCAPI provider opening the "Windows-MY" and "Windows-ROOT" stores, but neither contain certificates from the

  • Access sub domain on local machine 2010-11-12

    I have PHP source code of http://www.sitename.com. This site is located on Windows Operating System and Apache Web Server. I have .htaccess file as follows, DirectoryIndex index.php RewriteEngine on # THE MAIN sitename SITE RewriteCond %{HTTP_HOST} (

  • How can you access your online postgresql database when developing on your local machine? 2011-09-22

    I want to start developing a django app on heroku which uses the postgresql database. I already got my hello world django app working on heroku, but now I am wondering how to develop with the postgresql database. How do people do this? Can I link to

  • How do I get subdomains to work on my local machine? 2012-01-12

    I cloned a repo and am trying to get it to work. The app is very heavily dependent on subdomains. For example, signin.app.com or company1.app.com. However, since I am trying to get it to run on my local machine, I can't simply do signin.localhost:300

  • Rails only responds when accessed from local machine 2012-01-25

    I'm running a Rails application on a Mac Mini server machine (with Webrick, running ruby 1.9.2 using rvm). It works fine when I run it locally on my MacBook, and it was working before I reinstalled rvm, but now whenever I try to access it from a brow

  • Access Google Cloud SQL from python in local machine? 2012-03-01

    I am currently using my local machine to manipulate data, google app engine to host my web service and google cloud sql to handle the database. However, I need to upload my data to gae first, then run a backend job on gae to uploading all data to goo

  • Could I call dll methods from flash or could I access a device on the local machine ? 2013-06-06

    I need to call methods in a dll file or access a special device from flash , the dll has been installed on the local machine . And now I could call the methods through ane in AIR , and through the dll I could access the device on the machine . What I

  • Accessing MS Access database Remotely on Local machine using JDBC. 2012-08-21

    I have a MS Access database on remote machine. And I want to acess that database on local machine. Is it posible to use JDBC url for accessing Remote DB? If Yes how it can be used? Actually i am trying to use MS Access database in ODI. But the proble

  • Hosting web server on local machine and when I try to access the site I get slow performance. 2013-06-04

    I have a rather bizarre problem. I have my own local machines running a web server. The OS on the web servers are UBUNTU. My system is a DELL XPS and usually extremely fast. When I go to my site on the web server the response is very slow. Let me sho

  • Access windows server information( like System.IO) from a local machine 2013-06-27

    I am trying to make a console application in which I am trying to get the drive information from the local machine using System.IO. Now I want to get the same information for a server from my local machine, how do I do that? How do I connect to it? a

  • How configure 2008 servers to access the local machines access 2010 resource. 2015-01-26

    Is their a way to configure 2008 servers to utilize the local machines resources (MS office 2010) not the servers resources (MS office 2010)? --------------Solutions------------- In what context? Are you referring to running queries locally rather th

  • Access to local machine in windows 7 2010-06-14

    I want to create a registry key in local machine hive in windows 7. I used the following code in order to do so: RegistryKey regKey = Registry.LocalMachine.CreateSubKey(@"Software\Test", RegistryKeyPermissionCheck.ReadWriteSubTree); the code runs fin

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.082 (s). 11 q(s)