How to get full URL in Frame

Discussion in 'HTML' started by GTS, Aug 3, 2007.

  1. GTS

    GTS Guest

    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>
     
    GTS, Aug 3, 2007
    #1
    1. Advertising

  2. On Aug 3, 4:20 pm, "GTS" <> wrote:
    > 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.

    --
    David Dorward
    http://dorward.me.uk/
    http://blog.dorward.me.uk/
     
    David Dorward, Aug 3, 2007
    #2
    1. Advertising

  3. GTS

    GTS Guest

    "David Dorward" <> wrote in message
    news:...
    > On Aug 3, 4:20 pm, "GTS" <> wrote:
    >> 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.
    >


    I agree and hope to change this in the futher. However, I need a fix for
    the interim.

    >> 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.
    >


    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.
    >
    > --
    > David Dorward
    > http://dorward.me.uk/
    > http://blog.dorward.me.uk/
    >
     
    GTS, Aug 3, 2007
    #3
  4. On Aug 3, 4:58 pm, "GTS" <> wrote:
    > 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.

    --
    David Dorward
    http://dorward.me.uk/
    http://blog.dorward.me.uk/
     
    David Dorward, Aug 3, 2007
    #4
  5. GTS

    GTS Guest

    "David Dorward" <> wrote in message
    news:...
    > On Aug 3, 4:58 pm, "GTS" <> wrote:
    >> 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.
    >
    > --
    > David Dorward
    > http://dorward.me.uk/
    > http://blog.dorward.me.uk/
    >


    No kidding? :)
     
    GTS, Aug 4, 2007
    #5
  6. GTS

    John Hosking Guest

    GTS wrote:
    >
    > "David Dorward" <> wrote in message
    > news:...
    >> On Aug 3, 4:58 pm, "GTS" <> wrote:
    >>> 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.

    >
    > 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!

    --
    John
    Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html
     
    John Hosking, Aug 4, 2007
    #6
  7. GTS

    GTS Guest

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

    >>
    >> 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!
    >
    > --
    > John
    > Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html


    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.
     
    GTS, Aug 4, 2007
    #7
  8. GTS

    John Hosking Guest

    GTS wrote:
    >
    > 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.

    --
    John
    Putting down my bat and looking for my harikiri knife...
     
    John Hosking, Aug 4, 2007
    #8
  9. GTS

    GTS Guest

    > 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.
    >
    > --
    > John
    > Putting down my bat and looking for my harikiri knife...


    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.
     
    GTS, Aug 4, 2007
    #9
  10. John Hosking wrote:

    > -- John Pondering the value of the UIP:
    > http://blinkynet.net/comp/uip5.html


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


    --
    Blinky RLU 297263
    Killing all posts from Google Groups.
    Except in Thunderbird, which can't filter that well.
    The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html
     
    Blinky the Shark, Aug 4, 2007
    #10
  11. GTS

    John Hosking Guest

    Blinky the Shark wrote:
    > John Hosking wrote:
    >
    >> -- John Pondering the value of the UIP:
    >> http://blinkynet.net/comp/uip5.html

    >
    > 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).

    --
    John
    Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html
     
    John Hosking, Aug 5, 2007
    #11
  12. John Hosking wrote:
    > Blinky the Shark wrote:
    >> John Hosking wrote:
    >>
    >>> -- John Pondering the value of the UIP:
    >>> http://blinkynet.net/comp/uip5.html

    >>
    >> 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


    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. :)


    --
    Blinky RLU 297263
    Killing all posts from Google Groups.
    Except in Thunderbird, which can't filter that well.
    The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html
     
    Blinky the Shark, Aug 5, 2007
    #12
  13. On Aug 4, 3:33 pm, "GTS" <> wrote:
    > 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".)

    --
    David Dorward
    http://dorward.me.uk/
    http://blog.dorward.me.uk/
     
    David Dorward, Aug 5, 2007
    #13
  14. Gazing into my crystal ball I observed "GTS" <> writing in
    news:Un3ti.2517$dD3.222@trnddc07:

    >> 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.
    >>
    >> --
    >> John
    >> Putting down my bat and looking for my harikiri knife...

    >
    > 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.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Aug 5, 2007
    #14
  15. GTS

    GTS Guest

    >> 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.
    >
    > --
    > 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.
     
    GTS, Aug 5, 2007
    #15
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samuel R. Neff
    Replies:
    2
    Views:
    620
    bradley
    Jun 10, 2005
  2. David Thielen

    Get full url from relative url

    David Thielen, May 25, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    230
    David Thielen
    May 26, 2006
  3. Replies:
    1
    Views:
    198
    Ken Bloom
    May 28, 2007
  4. Replies:
    1
    Views:
    152
    David Mark
    Oct 16, 2007
  5. Replies:
    1
    Views:
    103
    GArlington
    Oct 18, 2007
Loading...

Share This Page