The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024

Latest message you have seen: Re: Query - Good Books?


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: OT: (ish) Web publishing question



Paul Gordon [mailto:paul_gordon@xxxxxxx] wrote:
> Sorry for the mildly off-topic post, but I know the answer is in here
> somewhere... and it does involve my HA server....
> I can currently access any or all of them by configuring port
> redirections on my router, so the request URL at the browser has to
> include a non-standard port number, - 80 for one machine, 81 for
> another and so on...
> This is OK, but sometimes I forget which port number to use for
> which machine!!
>
> So, what I want to do is to be able to redirect to the appropriate
> internal server by using a friendly URL instead, like
> http://paulgordon.homeip.net/server1
and
> http://paulgordon.homeip.net/server2
and so on....

So I pressume that paulgordon.homeup.net, gets forwarded onto your IIS
server on the relevant port?  IIS then replies so you could, for example,
respond with a list of URLS with the correct addresses to use internally
and
externally.

Eg: http://paulgordon.homeip.net/index.html
replies with a list:-
<html>...
* External IIS1 - http://paulgordon.homeip.net:81
* External Linux - http://paulgordon.homeip.net:82
* External HomeSear - http://paulgordon.homeip.net:83

* Internal IIS1 - http://mybuggyiis/
* Internal Linux - http://mrlinux/
* Internal HomeSear - http://homesear/
....</html>

Now assuming what I've said above would work in your situation, its now
just
a case of writing a small bit of asp to do this automatically for you.
http://paulgordon.homeip.net/server1/default.asp
needs to check some of the
server variables in the request to determine if you got to it externally or
internally.  Then it can redirect to the correct site.  Remember that a
redirect is just an 'object moved' response sent to your browser.  The
browser will send a new request to the new location, and so must be valid
to
work.

I needed to do a similar thing for dealing with the switch between http:
and
https: on the same site.  Links and redirects need to appreciate that you
may have got to the same site by a number of different methods. Eg. IP
address, internal hostname, external hostname, custom domain name added in
someones host file.  I wrote a small bit of ASP to do this automatically,
rather than just hard coding FULL url.  The full explict URL is included in
the HTML response, but it will be different depending on the URL you used
in
the first place.

I can provide more info on this, and/or my SecureLink() function as an
example if you like.


Rob
--
______   __   _   ______   ______
/ ___   / /  /  / __    / _____ HOME: chas@xxxxxxx
/ /  /_/ / /__/ / / /__/ / / /__    http://www.kaosuk.co.uk/
/ /  __  / ___  / / ___  /  \__  \            ----
/ /__/ / / /  / / / /  / / _____/ / Rob Chasmer, MMT Computing
______/ _/  /_/ _/  /_/ ______/ robert.chasmer@xxxxxxx

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please let us know by e-mail reply
and delete it from your system; you may not copy this message or disclose
its contents to anyone.  Please note that any views or opinions presented
in
this email are solely those of the author and do not necessarily represent
those of MMT Computing plc.  Finally, the recipient should check this email
and any attachments for the presence of viruses.  MMT Computing plc accepts
no liability for any damage caused by any virus transmitted by this email.


Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.