how to redirect to my ip?
Posted: Wed Jan 28, 2009 6:50 am
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??
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??