Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
route.php如果我去这里没有改变,我会http://example.com/test得到标准,但在Laravel 重定向到NotFoundHttpException的末尾有一个斜线。如何禁用该重定向?http://example.com/test/http://example.com/test?q=%2Ftest%2F
route.php
http://example.com/test
NotFoundHttpException
http://example.com/test/
http://example.com/test?q=%2Ftest%2F
在 Apache 中打开“AllowEncodedSlashes”指令:
<VirtualHost *:80> AllowEncodedSlashes On </VirtualHost>
打开这个指令会告诉 Web 服务器允许在 URL 中使用编码的斜杠。
再见