2014-12-16 1 views
1

나는 설치에 laravel을 설치하고 싶습니다. 내 호스팅에 domain.com 폴더 weblaravel in subdomain, htaccess 설정 방법

/
    |- domain.net 
    |- domain.com 
     |- web 
     |- sub 
      |- supersite 
      |- calendar 
        |- vendor 
        |- bootstrap 
        |- app 
        ... (all laravel files) 

홈페이지 사이트 :

내 호스팅 구조를 가지고있다. 모든 하위 도메인은 sub 폴더에 있습니다. 예를 들어 내 laravel 사이트 calendarcalendar.domain.com

에 의해 액세스 할 수 있습니다.이 .htaccess는 인터넷에서 발견되었습니다.

DirectorySlash On 
Options +FollowSymlinks -Indexes -MultiViews 
AddDefaultCharset utf-8 
DirectoryIndex /public/index.php 

<IfModule mod_rewrite.c> 
    RewriteEngine On 
    RewriteBase/

    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ /public/$1 [L,QSA] 
</IfModule> 

나는 파일 app/routes.php이 코드

Route::get('users', function() 
{ 
    return 'Users!'; 
}); 

내가 폴더 calendar.htaccess를 넣어에 추가. 사이트 calendar.domain.com은 정상적으로 작동하지만 사이트 calendar.domain.com/users이 서버 오류 500을 반환했습니다.

어디에서 문제가 있는지 알고 계십니까? 감사.

답변

1

당신의 DocumentRoot가 calender이고 당신이 일정 폴더에 htaccess로에서 이것을 사용할 수 있습니다 calender/public으로 변경할 수없는 경우

Options +FollowSymLinks 
RewriteEngine On 

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule^public/index.php [L]