Results 1 to 16 of 16

Thread: [RESOLVED] Redirecting using meta tags.

Threaded View

  1. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Redirecting using meta tags.

    Quote Originally Posted by mar_zim
    Vis what about those 301 redirect? Is it the header redirection?
    header("location: mypage.php");

    I've used meta tags (<meta http-equiv='refresh' content='5;url=$url'>) for a certain reason because when I used header function it will prompt me an error bec. there were some output send which violates the rule in using the header function. Does my page will be messy coz I always used the meta tags? I don't know what will happend in the long run using the meta tags.
    Your problem with output can be solved easily. Code your scripts better. Ideally you want all you output to occur after processing. If you really can't rewrite the code, start an output buffer in the first line of the script using:
    PHP Code:
    ob_start(); 
    Like I said already. Use a header to make redriects as the client is not required to act apon the meta tags. With a HTTP redirect, the status code is changed to 3xx, whereas when using a meta tag the status code will be 200 and you run into the caching problems I mentioned earlier.
    Last edited by visualAd; May 11th, 2006 at 04:21 AM.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width