Link not opening but trying to download..no idea why

Discussion in 'Programming' started by mjp92122, Nov 7, 2006.

  1. #1
    Hi,

    I have a page on a site that when you try to click on the link, it tries to "open or save this file" instead of opening the page and I have no idea why. Any suggestions are greatly appreciated. I'm sure it's something stupid but I can't figure out why.
     
    mjp92122, Nov 7, 2006 IP
  2. tflight

    tflight Peon

    Messages:
    617
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #2
    That normally indicates that the file extension isn't something that is recognized by the web server. For example if you create a file and give it an uncommon file extension (like file.xyz) your webserver doesn't know what type of a document (image, HTML, script) is being requested. Since it doesn't know how to process it the document will be downloaded instead.
     
    tflight, Nov 7, 2006 IP
  3. mjp92122

    mjp92122 Peon

    Messages:
    78
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The odd thing is that thy are .asp pages and it recognizes all the other .asp pages.
     
    mjp92122, Nov 7, 2006 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    I noticed that that happens sometimes when the browser fails to connect to the server. If that always happens you're maybe sending incorrect headers to the browser. Does it directly open after clicking or does it take a whlile?
     
    nico_swd, Nov 7, 2006 IP
  5. tflight

    tflight Peon

    Messages:
    617
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'll second what nico_swd said. Since other ASP pages are recognized it sounds like the script is sending out different headers. What webserver is being run? If you could publish a link to the link we might be able to spot the problem as well.
     
    tflight, Nov 7, 2006 IP