我有一个可以通过两种方式访问的网站:
http://localhost/public/blog
http://localhost/server.php/blog
我使用下面的代码从 url 中删除“public”及其工作。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
所以我尝试从上面的代码更改public/为server.php/。但它不起作用。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ server.php/$1 [L]
</IfModule>
服务器返回错误代码 500。
服务器日志日志报告:
[Wed Sep 04 01:06:53.801523 2019] [core:error] [pid 546] [client 182.253.16.222:36164] AH00124:由于可能的配置错误,请求超出了 10 个内部重定向的限制。如有必要,请使用“LimitInternalRecursion”来增加限制。使用“LogLevel debug”获取回溯。
所以我对第二个代码的期望是地址“ http://localhost/server.php/blog ”可以在没有 server.php 的情况下访问(http://localhost/blog)。
慕婉清6462132
肥皂起泡泡
九州编程
随时随地看视频慕课网APP