OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: markbedish on March 14, 2005, 06:55:24 am
-
Hi,
I am trying to run some webpages from my 750 on a local network (for my own use only). I have hardcoded the IP address in the web pages and links which work fine but of course this doesnt work if I change networks, e.g. from ethernet to wireless or bluetooth or if I am offline (required 127.0.0.1).
Does anyone know how to get round this limitation, e.g. do I need to register a domain name?
The other alternative is to buy webhosting space but I thought I would ask the linux gurus first if there was another method, as I would rather keep the pages on the zaurus!
Thanks very much.
Mark
-----
slc750 rc9.1
ethernet cf
bluemonkey bt cf
512 sd
-
I'm not sure that i'm picking you up fully, but use relative urls instead of absolute so that you don't have to hardcore the ip address. do a google.
-
I'm not sure that i'm picking you up fully, but use relative urls instead of absolute so that you don't have to hardcore the ip address. do a google.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=70573\"][{POST_SNAPBACK}][/a][/div]
I probably wasnt clear enough. The web pages are local to the zaurus on my sd so to access them I use for example 192.168.0.4/index.html.en which points to the links and these are all hardcoded too with the same ip address.
If I change network then the zaurus may get a different IP from the router so the links dont work. If I am offline then 127.0.0.1 gets me to the index but then I have to change the other links. I guess I need to register a domain and use that though it is behind a firewall, but just wondered if there was another way of doing it.
Thanks.
Mark
-----
slc750 rc9.1
ethernet CF, bluemonket BT, sd 512
-
As previously menitioned if you encode your links as 'relative' rather than 'absolute' links you shouldn't have the problem... i.e.
relative..
anotherpage.htm
absolute..
http://thiswebserver/anotherpage.htm (http://thiswebserver/anotherpage.htm)
OK ?... It may be the case, however, that you are using some technology that generates the pages for you - for example PHPWIKI - and I seem to recall that PHPWIKI insists in generating some absolute URLs.
If you HAVE to go this way then simply create an entry in your hosts file (on the client machine, not the web server) with the IP address and access it that way (update the 'Web Server' to specify the host name rather than IP address).
You are then free to modify the IP address in the hosts file accordingly.
- Andy
-
As per omega's suggestion DONT use hardcoded links - change the links to relative links, that way it doesn't matter what ip you have.
Instead of
Some link
use
Some link
Or if you really really must have hardcoded links, give them a name (ie Zaurus) and add Zaurus to your /etc/hosts file.
If you don't need to share the pages off the Z, then use 127.0.0.1, but hardcoded links are a curse and should be avoided whenever possible
Stu
-
Doh, took too long to reply and iamasmith bet me to it
-
Doh, took too long to reply and iamasmith bet me to it
[div align=\"right\"][a href=\"index.php?act=findpost&pid=70584\"][{POST_SNAPBACK}][/a][/div]
Ooh, the amount of times that's happened to me too!
-
As per others, don't hardcode the pages with absolute links. If you are sharing these pages to other computers on your network, then try not using DHCP. If you don't use them at the same time, use the same static IP for wireless and ethernet. If you want to share these pages out onto the internet from any network, then you would need to register with a dynamic dns organization. I do not know if the Z has software or what scripts you can make to have the Z notify of change address. Some home routers can do this.
-
As per others, don't hardcode the pages with absolute links.[div align=\"right\"][a href=\"index.php?act=findpost&pid=70607\"][{POST_SNAPBACK}][/a][/div]
Thanks for all the help from everyone. Local links are obviously the way, but I do use somethingh called pmwiki. also not sure about settings on Apache (httpd.conf), I think I hardcoded the url!
Mark
-----
slc750 rc9.1