Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
繼做完了部署 Zend Framework 應用程式到 Windows Azure 的實驗之後,今天抽空測試了一下另一個 PHP Framework: Laravel 的應用程式是不是也同樣容易,只要加一個 web.config 檔取代 .htaccess 的 rewrite rule 就可以。
部署 Laravel 應用程式幾個要注意的地方:
- 一樣要到設定的頁面,將 / 路徑改成對應到 site\wwwroot\public。(因為 Laravel 的應用程式根目錄是設定在 public/ 目錄下)
- 因為 Windows Azure 網站服務,底層的 Web server 是 IIS,所以需要用 web.config 檔案來設定 rewrite rule。只要在 public/ 目錄下新增一個 web.config檔案,內容如下所示:
詳細的步驟可以參考 Zend Framework 那篇的說明。