How to get full URL in Frame

G

GTS

My client has an odd setup where his web site is hosted on an external
server but to enable access to it using his servers domain name/url a frame
is used pointing to the IP address of the external server. This works fine
for the top level (first link) with the HTML code below. However, a sub
page cannot be accessed directly this way. I'm looking for a way to get the
full URL passed to the frame and putting it into a variable that I can then
use with the src. This is on a Linux server running Apache.
I'd appreciate any ideas on this.

http://mywebsite.com/
http://mywebsite.com/susiepage

<HTML>
<FRAMESET rows="0,*" Border=0 frameborder="0">
<!--Below is where you enter the address you want showing in your visitors
browser address bar-->
<FRAME src="wh0 dat" SCROLLING=NO>
<!--Below is where you enter the address you want showing in the browser
window-->
<FRAME SRC="http://99.99.999.99" SCROLLING=auto><noframe>
<body><p>This page uses frames, but your browser doesn't support them.</p>

<meta
http-equiv="refresh" content="0; URL=http://99.99.999.99">
</HTML>
 
D

David Dorward

My client has an odd setup where his web site is hosted on an external
server but to enable access to it using his servers domain name/url a frame
is used pointing to the IP address of the external server.

Sounds like typical check-and-nasty frames based DNS hosting. He
really should get proper hosting instead.
This works fine
for the top level (first link) with the HTML code below. However, a sub
page cannot be accessed directly this way. I'm looking for a way to get the
full URL passed to the frame and putting it into a variable that I can then
use with the src.

Do you control the server that generates the frame source code? If so,
fix the syntax errors (starting with the missing doctype), then
dynamically generate the src attribute based on the URL of the page
reqested.

Otherwise, you can't do anything about it.
 
G

GTS

David Dorward said:
Sounds like typical check-and-nasty frames based DNS hosting. He
really should get proper hosting instead.

I agree and hope to change this in the futher. However, I need a fix for
the interim.
Do you control the server that generates the frame source code? If so,
fix the syntax errors (starting with the missing doctype), then
dynamically generate the src attribute based on the URL of the page
reqested.

Yes. I do now control the server. I appreciate the reply but advising me
to dynamically generate the src attribute doesn't help. That was my
question - How can I dynamically generate the src attribute based on the
URL of the page reqested? More specifically, how can I determine the full
URL?
Thanks.
 
D

David Dorward

Yes. I do now control the server. I appreciate the reply but advising me
to dynamically generate the src attribute doesn't help. That was my
question - How can I dynamically generate the src attribute based on the
URL of the page reqested? More specifically, how can I determine the full
URL?

That depends on the server and what you run on it.
 
J

John Hosking

GTS said:
No kidding? :)

I guess the smiley means you're satisfied with the answers and don't
need any more help, for example with how you determine the full URL.

HAND!
 
G

GTS

I guess the smiley means you're satisfied with the answers and don't need
any more help, for example with how you determine the full URL.

HAND!

No, it was meant as a nice way of saying 'What's the point of posts that
state the obvious, impart no information, and just tell me you don't know
the answer either?". I already stated the type of server (OS and web
server). I'm a system and networking professional, admittedly rusty on web
development, and frequently help others especially in the Microsoft news
groups. I don't play games with people.

Is your post meant to imply you have a possible solution? If so, I'd
appreciate it.
 
J

John Hosking

GTS said:
No, it was meant as a nice way of saying 'What's the point of posts that
state the obvious, impart no information, and just tell me you don't
know the answer either?". I already stated the type of server (OS and
web server). [...]

Is your post meant to imply you have a possible solution? If so, I'd
appreciate it.

No, it was meant to imply that you should have provided the info about
OS and web server when David asked for it. I wasn't trying to be
especially nice. I thought you were being a jerk. I was hoping that that
would filter through, in a slow and subtle way.

Turns out I'm the jerk. I've looked back through your posts again, this
time for the third time, and finally located the sentence "This is on a
Linux server running Apache." It actually appears in two posts, in clear
black letters. Nevertheless, I missed it before. Twice.

By way of apology, I'd *love* to provide a possible solution, but (a)
I'm only just starting with Apache (what little expertise I have is MS
IIS), and (b) I don't completely understand your situation. I've been
monitoring the thread so I can figure out the problem. (I still don't
see what doesn't work. I also don't do frames, so that's my third
strike, and I go down swinging.)

Good luck.
 
G

GTS

By way of apology, I'd *love* to provide a possible solution, but (a) I'm
only just starting with Apache (what little expertise I have is MS IIS),
and (b) I don't completely understand your situation. I've been monitoring
the thread so I can figure out the problem. (I still don't see what
doesn't work. I also don't do frames, so that's my third strike, and I go
down swinging.)

Good luck.

Thanks for the thought and good wishes. I'm more well versed in IIS and
Windows also. I think I have a lead on a solution using a PHP script, not
my forte, but something I may be able to work with by a little study having
done some scripting with similar tools in the past.
 
J

John Hosking

Blinky said:
Oh, c'mon. :) It's the best thing since sliced...uh...Google Groupers.

Well, I'm still "pondering" because (a) I'm not sure that there aren't
some good souls out there who, nevertheless, make worthwhile posts via
GG, and (b) I haven't completed my slow-motion migration to Dialog, and
TB doesn't do scoring. I can picture myself at "killing" (if not
"slicing") sometime soon, though. In the meantime, my sig (potentially)
points ponder-prone people to the UIP (promotionally).
 
B

Blinky the Shark

John said:
Well, I'm still "pondering" because (a) I'm not sure that there aren't
some good souls out there who, nevertheless, make worthwhile posts via
GG, and (b) I haven't completed my slow-motion migration to Dialog,
and

I rather like Dialog, althought not its proprietary scoring. I can
share score files between other clients (even between Win and Linux).
So I use Dialog only for email only on my Win laptop. My favorite of
the Windows clients is Xnews. It's one that can share my main score
file with others.
TB doesn't do scoring. I can picture myself at "killing" (if not

Note the third text line in my sig. :)
"slicing") sometime soon, though. In the meantime, my sig
(potentially) points ponder-prone people to the UIP (promotionally).

And I was just about to thank you for having it there. So...hey, thanks
for having it there. :)
 
D

David Dorward

I already stated the type of server (OS and web server).

... but not if it supports CGI (Perl, python, ruby), mod_perl,
mod_mono, PHP, etc, etc.

(And I'll confess I overlooked the mention of the OS and HTTPD in the
initial post, "No kidding" doesn't do a very good job of pointing out
"Well I did already mention".)
 
A

Adrienne Boswell

Thanks for the thought and good wishes. I'm more well versed in IIS
and Windows also. I think I have a lead on a solution using a PHP
script, not my forte, but something I may be able to work with by a
little study having done some scripting with similar tools in the
past.

My suggestion is to loop through the server properties, and one of them
should tell you what the full URL is, IIRC SCRIPT_NAME is the one that
will do it. Check http://us2.php.net/reserved.variables for some more
server variables and http://koivi.com/apache-iis-php-server-array.php
gives a comparisson between IIS and Apache.
 
G

GTS

little study having done some scripting with similar tools in the
My suggestion is to loop through the server properties, and one of them
should tell you what the full URL is, IIRC SCRIPT_NAME is the one that
will do it. Check http://us2.php.net/reserved.variables for some more
server variables and http://koivi.com/apache-iis-php-server-array.php
gives a comparisson between IIS and Apache.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Thanks! That looks promising.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top