laravel 4,如何确保在url中有index.php

时间:2013-06-06 12:09:49

标签: url laravel laravel-4

我正在学习Laravel 4,我不能在我的托管空间中使用.htaccess,所以我需要在我的网址中不断使用index.php,否则我最终会得到404.

有没有办法让laravel 4知道我的url中需要index.php(在laravel 3中,配置文件application.php中有一个键,我想,现在似乎已经消失了)< / p>

示例:

* if I'm in the url localhost : 
URL::to('logout') => localhost/logout (404)

* but in the url localhost/index.php : 
URL::to('logout') => localhost/index.php/logout (ok)

目前,作为快速入侵,我使用过滤前来重定向/index.php页面,如果还没有。

还有其他更好的方法吗?

由于

1 个答案:

答案 0 :(得分:0)

在/app/config/app.php中将'url'值更改为您的域+ index.php