我已經將我的laravel 4.2應用程序上傳到共享主機的/subfolder
,如www.example.com/bangla通過以下方式this答案。我的應用程序的如何在Laravel 4.2中設置基礎URL /子文件夾
結構
現在我有我的觀點,這些菜單鏈接
<li><a href="/">Home</a></li>
<li><a href="/rj">Rj</a></li>
我的問題是,每當我點擊他們應該航線我
www.example.com/bangla
www.example.com/bangla/rj
但它需要
www.example.com
www.example.com/rj
我route.php看起來像
Route::get('/','[email protected]');
Route::get('rj','[email protected]');
HomeController.php看起來像
public function index()
{
return View::make('home');
}
public function rj()
{
return View::make('rj');
}
所以基本上的基本路徑沒有被改變到子文件夾www.example.com/bangla
我做了很多o f在計算器中搜索。有些是
laravel 4 setting base url to /subfolder
How to set sub-directory for base URL of laravel?
在 laracast也。但是,所有人都沒有得到答覆,或者他們沒有任何解決問題的答案。
所以,簡單地說,問題是如何如果您使用與/
開頭的URL基本URL從www.example.com到www.example.com/bangla
你在你的app.php文件中設置的網址是什麼?你能設置一個虛擬主機到那個目錄/子目錄嗎? – Revent
這個URL在app.php中的作品與工匠相關的命令工作與基地無關我認爲@Revent –