Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Sep 2003
    Posts
    42
    Member #
    2955
    Note. Some user agents support the use of META to refresh the current page after a specified number of seconds, with the option of replacing it by a different URI. Authors should not use this technique to forward users to different pages, as this makes the page inaccessible to some users. Instead, automatic page forwarding should be done using server-side redirects.
    How do you do a server-side redirect?

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    What do you want to use? PHP? ASP? SHTML?
    JR

  4. #3
    Member
    Join Date
    Sep 2003
    Posts
    42
    Member #
    2955
    Done in ASP.

  5. #4
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    The best way is to use mod_rewrite using .htaccess on apache.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  6. #5
    Senior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    735
    Member #
    1935
    <%
    response.buffer=true 'this MUST be the first line of the page

    response.redirect("pagename.asp") 'this will redirect the user
    %>

    that will work. but dont forget to set the page buffer on the top of the page..

  7. #6
    Member
    Join Date
    Sep 2003
    Posts
    42
    Member #
    2955
    Im confused by the way you wrote that.

    <%
    response.buffer=true

    That goes on the top line before the Doc type

    response.redirect("pagename.asp")

    That goes on the body area?

  8. #7
    Senior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    735
    Member #
    1935
    yes, <% response.buffer=true %> must be the first line on the page..
    After that you can put as many redirects on the page as you like.

    example:
    Code:
    <%
    response.buffer=true
    dim x
    x=10
    
    if x<10 then response.redirect("somepage.asp")
    %>
    <html>
    ...
    </html>

  9. #8
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    that method still breaks the back button. That's a bad thing.

    also, if you only have one redirect, you don't need response.buffer=true, just make sure no output to the page (html) has been made.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  10. #9
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Sending the HTTP "Location" header should not break the Back button. That's what WDF uses now that I killed the redirects. They're actually still there, just invisible.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:32 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com