My apache server runs on my localmachine that is linked to some more systems by LAN. All the systems in LAN are connected to a router and we have a static ip to link and host the application to show to the customers.
The problem is:
I have to give the location of a file through the url. This works fine by using $_SERVER variable for the ip address but only in the local machine and in lan. When anyone from outside the lan uses it, it doesnt give the ip of the static ip. This way its not possible for me to give the url location of the file.
How do i solve this?
One of the possible solutions might be to index the Lan machines(my lan machines have 192.168.1.* ips) and if it is not one of those, i will have to manually set it to the public ip.
How do i do this??
how to redirect to my ip?
Moderator: General Moderators
-
jason.carter
- Forum Commoner
- Posts: 35
- Joined: Sat Jan 10, 2009 10:05 am
Re: how to redirect to my ip?
what is the link you give to others to access your site in LAN?
Re: how to redirect to my ip?
I give the localip of my system for accessing my site in lan. my local ip is 192.168.1.103 and for everyone in the lan i give it like http://192.168.1.103:9090/mysite/
I am running apache on port 9090 for some other reasons.
I am running apache on port 9090 for some other reasons.