How can I disable PHP's “easter egg” URLs?

前端 未结 4 539
名媛妹妹
名媛妹妹 2020-12-12 14:18

I recently found out about the so-called \"easter egg URLs\" in PHP:

These are the four QUERY strings you can add to the end of a PHP web page to view

4条回答
  •  [愿得一人]
    2020-12-12 15:00

    Not sure about your case, but it's work for my site. Hope, it will work for your site as well as.

    RewriteEngine On
    RewriteCond %{QUERY_STRING} \PHPE9568F36-D428-11d2-A769-00AA001ACF42\ [NC]
    RewriteRule .* - [F]
    

    Of course, just copy the last 2 lines for each of the other possible queries or write a more generic regex. I'm not good with regex. :)

提交回复
热议问题