2013-10-13 3 views
0

나는 이것이 많은 사람들이 가지고있는 문제이지만 여전히 모든 결과를 얻지는 못했지만 여전히 문제를 안고 있음을 안다. 나는이Laravel 깨끗한 URL 문제

숏 다리 ../ 공공/index.php에 다음과 같은 얻을 내가

숏 다리로 이동이 순간

.../공공/사용자

/users가이 서버에서 발견되지 않았습니다.

하지만 URL 바에 index.php를 추가하면 작동합니다. 합니다 (청소하지 버전)

이 내 htaccess로 파일

<IfModule mod_rewrite.c> 
    Options -MultiViews 
    RewriteEngine On 

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

입니다 그리고 이것은

<Directory "/Library/WebServer/Documents"> 
# 
# Possible values for the Options directive are "None", "All", 
# or any combination of: 
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 
# 
# Note that "MultiViews" must be named *explicitly* --- "Options All" 
# doesn't give it to you. 
# 
# The Options directive is both complicated and important. Please see 
# http://httpd.apache.org/docs/2.2/mod/core.html#options 
# for more information. 
# 
Options Indexes FollowSymLinks MultiViews 

# 
# AllowOverride controls what directives may be placed in .htaccess files. 
# It can be "All", "None", or any combination of the keywords: 
# Options FileInfo AuthConfig Limit 
# 
AllowOverride All 

# 
# Controls who can get stuff from this server. 
# 
Order allow,deny 
Allow from all 

답변

2

당신의 RewriteRule^ index.php에 변경 시도 내 httpd.conf 파일입니다. 또한 실패한 경우 작업중인 도메인의 전체 가상 호스트 구성을 공유하여 문서 루트를 볼 수 있습니다.

Laravel 설치가 도메인 루트에 없다면 RewriteBase을 추가해야합니다. 예를 들어 공용 문서 루트의 폴더에 //localhost/myfolder/과 같은 폴더를 설치 한 경우 RewriteBase/myfolder/public/으로 설정해야합니다. 당신이하지 아래에 웹 루트 위에 Laravel을 설치하고, 경우

또한, RewriteBase/public/로 설정해야합니다 당신의 다음 (을 권장하지 않음).

그러나 내가 말했듯이, 상대적으로 말하면 호스트 도메인에 대해 모든 것을 말할 수는 없습니다. 따라서 위의 방법으로도 문제가 해결되지 않으면 전체 가상 호스트 구성으로 질문을 업데이트하십시오.

0

나는 Xampp 서버로 옮겨서 'index' => '',app/config/app.php 안에 넣음으로써 나에게 효과적이었다. 바라기를 그것은 또한 u를 위해 작동 할 것이다. 해피 코딩.