Laravel remove public path

  1. Web Service Document Root
    • nginx
      • root /{laravel_path}/public
  2. .htaccess
    • apache (link)
      • <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule ^(.*)$ public/$1 [L]
        </IfModule>
  3. Move Public folders To Root (link)
    1. mv {laravel_path}/public/* {laravel_path}/
    2. {laravel_path}/index.php
      1. echo 出 __DIR__ 後,調整 autoload.php & start.php 路徑
    3. {laravel_path}/bootstrap/paths.php
      1. 'public' => __DIR__.'/../public',改成 'public' => __DIR__.'/../..',
Laravel remove public path Laravel remove public path Reviewed by Wild on 11/20/2014 03:31:00 下午 Rating: 5

沒有留言:

沒有Google帳號也可發表意見唷!

技術提供:Blogger.