dtwknzk3764 2012-07-23 18:20
浏览 123
已采纳

为什么我的QUERY_STRING为空?

I am running a server locally. It's Apache2 with PHP. Following are the files that I have written.

.htaccess

ErrorDocument 404 /notFoundError.php

/notFoundError.php

<?php
  echo phpinfo();
?>

When I type some non-existing url http://localhost/this/is/dummy?key=value, it successfully redirects to notFoundError.php and prints the phpinfo table. There I do not find key=value in the _SERVER["QUERY_STRING"] row.

  • 写回答

2条回答 默认 最新

  • douwang9650 2012-07-23 18:25
    关注

    Check out how to Pass query string in 404 error redirect through .htaccess? for your answer.

    You will need to access $_SERVER['REDIRECT_QUERY_STRING']

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?