Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Oct 2003
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Response.Redirect but keep the same address

    I'm creating a site for my family and to save on hosting, I just bought the domain name and pointed towards my host (jgadesign.net) In the index.asp I have:
    if redirect = "www.raderville.net" then
    Response.Redirect "http://www.jgadesign.net/rv/"
    end if

    and I was wondering if there was a way to keep www.raderville.net in the address bar rather then having www.jgadesign.net/rv. is this possible?

    jga
    ·JGADesign·

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    no

    It is a security issue...

    best thing you can do is either recreate all of the pages under that domain or two use frames to keep the nae on top.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Senior Coder Morgoth's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada Remaining Brain Cells: 6
    Posts
    1,402
    Thanks
    2
    Thanked 1 Time in 1 Post
    Hehe, they are methods, here try this instead of the redirect.

    Code:
        Response.Clear
        Server.Transfer("/dir/page.asp")
        Response.End
    I don't know for sure, but this might put a little bit more load on your server because it loads the first page and then finds out it has to clear the buffer, than load the new page. I think this will work though, please reply back with results.

  • #4
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Morgoth
    Hehe, they are methods, here try this instead of the redirect.

    Code:
        Response.Clear
        Server.Transfer("/dir/page.asp")
        Response.End
    I don't know for sure, but this might put a little bit more load on your server because it loads the first page and then finds out it has to clear the buffer, than load the new page. I think this will work though, please reply back with results.
    Server.Transfer only works for going to another page on the same webserver, so for our posters example, it might not work.
    I also don't think you need the response.clear or response.end

    To keep the initial url in the adressbar: just use a framepage that only contains 1 frame that spans 100% of the height and width. The urls wount change then. But this doesn't allow the user then to bookmark the site.

    some more info on redirect and transfer:
    http://www.codingforums.com/showthre...erver.transfer
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #5
    Senior Coder Morgoth's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada Remaining Brain Cells: 6
    Posts
    1,402
    Thanks
    2
    Thanked 1 Time in 1 Post
    Oh, darn, I didn't read the words right.
    I thought www.raderville.net & www.jgadesign.net/rv were the same url.

    The clear command, I beleive, helps on the load, but it works without Response.Clear.
    And Response.End is a precautionary measure.

    Well, it would have worked if the url was the same. :/

  • #6
    Senior Coder Morgoth's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada Remaining Brain Cells: 6
    Posts
    1,402
    Thanks
    2
    Thanked 1 Time in 1 Post

    Lightbulb

    I guess for the sake of archiving for people to do searches, I will post the script to use frames.

    Here you go, jgallen23.

    Code:
    <html>
      <head>
        <title>Your TITLE!</title>
      </head>
      <frameset rows="100%">
        <frame src="http://www.YOURPAGE.net" scrolling="yes" noresize name="uniquepage">
      </frameset>
      <noframes>I am sorry, but you don't have frames enabled on your browser. Please use this link to view the Digitally Imported Radio IRC stats. <a href="http://www.YOURPAGE.net">http://www.YOURPAGE.net</a></noframes>
    </html>
    Now if this page can use asp, you can replace http://www.YOURPAGE.net with <%=strYourPage%>
    And put this at the top. (Just incase it might change, or just to simply your code)
    Code:
    <%
    Dim strYourPage
    strYourPage = "http://www.YOURPAGE.net"
    %>
    Enjoy!

  • #7
    New Coder
    Join Date
    Oct 2003
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it appears when I do that, my session variables get a little messed up, is there anyway around that?
    ·JGADesign·

  • #8
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What sort of answer do you expect to that? --> more info please ...

    One thing i can say though : make sure that the framepage isn't the first page they end up on on your site, if it contains more then one frame. They should go through another ASP page behore comming to this framepage.
    If you opee a framepage with 2 frames, as the first page from your site, then a new session will be created for each page inside one of the two frames. So the one client would then have 2 sessions and they would timeout etc completely independently.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #9
    New Coder
    Join Date
    Oct 2003
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, that makes sense, but wouldn't I have to make the first page they see a frame page to keep http://www.raderville.net in the address bar?
    ·JGADesign·


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •