include after PHP 404 header returning “Oops! This link appears to be broken.”

前端 未结 2 1064
清酒与你
清酒与你 2020-12-09 17:00

To make a long story short, I have dynamic pages on a website that display reviews. If there are no reviews associated with a particular city/county/area/etc the mysql query

相关标签:
2条回答
  • 2020-12-09 17:19

    Trying redirecting using a 307 or 301 with a location header

    0 讨论(0)
  • 2020-12-09 17:28

    Your problem has nothing to do with what you include: It's that your page is too small.

    In my experience, Chrome's built-in "Oops" page is displayed, like the one in Internet Explorer, when the page emits only the 404 header and less than a defined number of bytes of content (I think it's 512 bytes in IE, don't know the limit in Chrome).

    I tend to pad my 404 pages with a few hundred bytes of meaningless content wrapped in HTML comments to make sure the custom 404 page is displayed.

    Or of course, use the opportunity for some cool ASCII Art!

       <!--                            oooo   ooo
                                       $   $  $   $
                                       "o  $ $  o""
                                         o  "   "ooooo
                                     oo ""           o$
                       o            o            oo  "
                      $$             $o$""$o  ooo$
                      $"$          o $    "$  $
            o$o       $ "$         $ $     $ $
             $$$o     $$ "$       o$ $     o $o
             "$ ""o   "$   "o     $$ "o     o"
         $o   $$   "o  $     "oo  $"  $   o$"
          "$   $o    "o$$       "o$    $o$" oo$
            "o "$o                     "$o $"$$
              "        oo$$$$$$$oo        $oo$$""      o" o
     """""""""      o$$$$$$$$$$$"$o             o"""$o$$  o$
           ooo$$$"o$$$$$$$$$$$$$$ "$o    o   o$$$o   $ $ o$
        o$$$$$$$$$$$$$$$$$$$$$$$$    "oo  o      ""o  "$ $
       $$$$$$$$$$$$$$$$$$$$$$$$$$      "$o   o$$"""$     " oo""o
    o""""$$$$$$$$$$$$$$$$$$$$$$"         ""$o"$o          "   o$
         "$$$$$$$$""""$""$$$""              "$oo$""$o     o$"""
          $$$$$$$"                           $""""$"  o""""
           $"""""$ooooo        ooooo$$$$$$$     o$" o"
            $     """" oooo$$$$$$$$$$$$$$"     $"  o"
          oo$   oooo$$$$$$$$$$$"""""$$$$"    o$" o$"
        "$ $o$$$$$$$$$$$$$""$     o$$$"oooo$"  o"
          "o$ "$$$$$$$$$$$$         $$o$"$$$   $"
            "$  ""$$$$$$$$$        o$"$$$ "$$o$$
              "o   ""$$$$$$o     o$$$$ ""$o """$
                "$o    ""$$$$$$o"  o$$$$oo o$$$$
                   ""$oo     $$" "$$$"" ooooooo$
                        """"$"  o$"   oo$$$$$""$$
                           $ oo$"  o$$$$$""  ooo$
                           $o$"  o$$$$"  oo$$$$$$$o
                            $$ o$$$"  o$$$$$$"""""$o
                             "o$$"  o$$$$""  o$$$$$$$o
                               "$oo$$$$"  o$$$$$""" o$o
                                 "$$$" oo$$$"" oo$$$$$$$
                              ooooo$oo$$$"" oo$$$$"""$$""
                             $"oooo $$$" o$$$$""      $
                           o$"o$   $$"oo$$""       " o$
                           $ o$$o  $$o$$"          oo$$
                           $ $$$$  $$$$$$$$$$$$$$$$$$$$
                           $ $$$$  $$$$$$$$$$$$$$$$$$$$"
                           $ $$$$  $$$$$$$$$$$$$$$$$$$$
                           $ ""    ""$$$$$$$$$"""$""""
                           $o         $"$"    " $"
                            $o       $$  $o    o$
                             "$o   o$$    ""$$$"
                               """"""  -->
    
    0 讨论(0)
提交回复
热议问题