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 5 of 5
  1. #1
    New Coder
    Join Date
    May 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Strange redirect problem

    Hi.
    I have a strange redirect problem with my isp's server.
    Every pages that redirect the browser to index.php page by header("Location ...") function return an error "Impossible view the page", but only if I use IE 5.x as browser and the pages are in my isp's server, in my local network I use a linux server with apache 2.0.48 and php 4.3.4 (like my isp's server) and I haven't any problem!
    My isp doesn't allow me to view the log files so I can just imaging the server return me http status "302 Found" when I redirect it by header function and then it didn't find the location field so he return me the error, but I can't understand why it happens only when I use ie 5.x (if I use ie 6.x, netscape or opera I haven't any problem).
    I hope you can understand because it's very difficult to explain this problem and my english it's not good at all.
    Help me please!!!

    thanks in advance
    Lele

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you post a link to a page with such a redirect, so that we can see it ourselves?

    Did you try this on different computers ? (I wouldn't like to waste my time on a problem that is caused by some browser-problem on your machine)
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #3
    New Coder
    Join Date
    May 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes, I tried with different pc and I have the same problem if I use ie 5.x, I tried to copy the pages on different server too but nothing change.

    The link where I have the problem is http://www.etnetweb.it/elettronica/index.php , if you click on Offerta in the left box menu with ie 5.x you'll can see the error.
    The code is very simple:
    header("Location: http://".$_SERVER['HTTP_HOST']."/elettronica/".$location);
    and if I use different browser it works.

    Thanks

  • #4
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hmm. it's not the redirect-code because when i enter http://www.etnetweb.it/elettronica/index.php?id=6 in the adressbar, and enter, then i get the same errorpage

    i would first try to rename the page (copy and rename it to testfile.php), and then enter

    http://www.etnetweb.it/elettronica/testfile.php?id=6

    and see what happens.

    Could you else post the code that you use to check for and process the querystring (the id=6) ?
    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
    New Coder
    Join Date
    May 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't get the error if I use id=6, and the strange thing is that if I delete the right and left image scrolling box (now I've just deleted it) I don't get any error. If you try now you don't get the error.
    I've already tried to rename the index.php page but I get the same error.

    Anyway the code is:


    PHP Code:
    function LoadPage($id
    {
      
    $db $this->db;
      
    $q "SELECT tipo_pagina FROM pagina WHERE id_pagina = $id";
      
    $db->dbquery($q);
      
    $riga $db->dbfetchassoc();
      switch (
    $riga['tipo_pagina']) {
        case 
    1// Homepage
           
    $location "index.php";
           break;
        case 
    2// novità
           
    $location "index.php?a=novita&p=$id";
           break;
        case 
    3// offerte
           
    $location "index.php?a=offerte&p=$id";
           break;
        case 
    4// promozioni
           
    $location  "index.php?a=promozioni&p=$id";
           break;
        case 
    5// carrello
           
    $location "index.php?a=carrello&s=viewcart&p=$id";
           break;
        case 
    9// generica
           
    $location "index.php?a=content&p=$id";
           break;
      }
      
    header("Location: http://".$_SERVER['HTTP_HOST']."/elettronica/".$location);

    thanks
    Last edited by lelebug; 04-02-2004 at 03:53 PM.


  •  

    Posting Permissions

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