SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Nov 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    forwarding/redirecting HTML/ASP pages

    I do some freelance for a portal site with a lot of clients.

    Like
    http://www.myportal.com

    All clients have .asp pages like this:
    Example for clientX
    http://www.myportal.com/member_info.asp?member=70

    Now we would like to have that your clients can login to our site directly to their page
    Like this
    http://www.myportal.com/clientX
    and than they get forwarded or redirected to
    http://www.myportal.com/member_info.asp?member=70

    How can I do this?
    I made some folders in the root like clientX with an index.html.
    containing the code:

    <html>
    <head><title>clientX</title>
    <meta http-equiv="Refresh" content="1; URL=http://www.myportal.com/member_info.asp?member=70">
    </head>

    When I open the index from my HD it opens the
    http://www.myportal.com/member_info.asp?member=70
    without any problem
    However when I upload the index to the server and type in my browser:
    http://www.myportal.com/clientX
    I get a 403, Forbidden
    When i visit
    http://www.myportal.com/clientX/index.html
    everything works..

    I tried on another server where it does work without the index.html

    Also we have over 150 clients and it will be very messy to make all folders for them in the root..
    Is there another way?
    Someone mentioned me that
    "on unix servers (which we have) you can just modify the .htaccess file and not even set up the folders. In asp, you could do it the way you did and then create a meta refresh page with that code"
    I have no idea what a .htaccess file is..

    Another thing it would be nice if the address in the browser stays pinned on
    http://www.myportal.com/clientX
    Is that possible? With a frameset at 100% or something?

    I know many question, I hope that someone can help me, this feature would be very nice for us


    Many Thanks
    TunaFish
    tunafietsh@hotmail.com

  2. #2
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    sounds pretty easy.

    When you log the person in you can find his member number. so you would do somthing like this.

    Code:
    Dim memberNo, sURL
    
    MemberNo = 70
    
    sURL = "member_info.asp?member=" &memberNo
    
    Response.redirect(sURL)
    Thats about it.

    hope that helps
    .NET Code Monkey

  3. #3
    SitePoint Member
    Join Date
    Nov 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply

    sorry to dissapoint you
    I don't have a clue where to put that code..
    Is that HTML?

    Also the pages are not private or something, anyone should be aible to access them that way..
    Does this solve also the folder problem?

    Thanks anyway..
    TunaFish
    tunafietsh@hotmail.com

  4. #4
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have to put that into the ASP page befoe anything is sent to the client or it will cause and error.


  5. #5
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you also have to put it in the proper ASP Brackets. For example:
    Code:
    <%Dim memberNo, sURL
    
    MemberNo = 70
    
    sURL = "member_info.asp?member=" & memberNo
    
    Response.redirect(sURL)
    %>
    <HTML>
    <HEAD>
    etc., etc.

    NOTE: This would require you to, when a user logs in, retrieve his member number from a database.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  6. #6
    SitePoint Member
    Join Date
    Nov 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anybody knows more about the .htaccess file?
    I made one in notepad containing:

    Redirect /clientX http://www.myportal.com/member_info.asp?member=70

    and saved as .htaccess
    Uploaded to the Unix server, but it doesn't work

    btw thanks for the .ASP tips but I don't see to understand anything..
    In which ASP page should I have to put that in?
    In the member_info.asp? I tried that but it didn't work...

    I would like that clientX (and everybody else) gets forwarded to from
    http://www.myportal.com/clientX
    (without any index or .html!) to his
    http://www.myportal.com/member_info.asp?member=70
    page..

    I must be stupid
    TunaFish
    tunafietsh@hotmail.com


Bookmarks

Posting Permissions

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