Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel:500除'/';_Php_.htaccess_Laravel 4 - Fatal编程技术网

Php Laravel:500除'/';

Php Laravel:500除'/';,php,.htaccess,laravel-4,Php,.htaccess,Laravel 4,这有点奇怪,但它正在发生。我找到了解决办法 解决方案在.htaccess文件中,而不是在php中。需要在.htaccess文件中更改第行 RewriteRule ^ index.php [L] 到 同样的方法在一台服务器上运行良好,但在另一台服务器上却不行 我想了解这种行为。为什么会发生这种情况?如果出现服务器错误,请检查日志。我猜是index.php和/index.php@RajanRawal之间的区别:你的问题到底是什么? RewriteRule ^(.+)$ /index.php [L]

这有点奇怪,但它正在发生。我找到了解决办法

解决方案在
.htaccess
文件中,而不是在php中。需要在.htaccess文件中更改第行

RewriteRule ^ index.php [L]

同样的方法在一台服务器上运行良好,但在另一台服务器上却不行


我想了解这种行为。为什么会发生这种情况?

如果出现服务器错误,请检查日志。我猜是
index.php
/index.php
@RajanRawal之间的区别:你的问题到底是什么?
RewriteRule ^(.+)$ /index.php [L]