0
내 컴퓨터에있는 Dev 서버에서 URL이 dmb.dev
으로 변경되도록 가상 호스트를 설정하여 많은 경로가 /
에서 시작되었으므로 URL을 공개하지 않습니다. 프로젝트를 테스트 서버로 전송 한 후에 공개 설정을 제거하도록 일부 설정을 구성합니다. 자, http://server
대신에 http://server/dmb
이 아직 남아있어 내 경로를 제외하고 모든 자산이 작동 중입니다. Failed to load resource: /myurl
의 오류가 발생합니다.Laravel 라우팅이 다른 서버로 이동 한 후 실패 함
내 샘플 경로
Route::get('/', '[email protected]')->name('index');
Route::get('/generate_bing', '[email protected]')->name('index.getImage');
Route::get('/users', '[email protected]')->name('users')->middleware('auth','role:owner');
내 루트 htaccess로
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule^%1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule^index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
내가 ... 내가 그래서 내 루트 폴더를 제거 솔루션을 생각하고 등/DMB 모든 경로를 변경해야합니까 http://server
처럼 보이지만, htdocs에는 다른 프로젝트가 있으므로 폴더에 저장해야합니다. BTW 난 xampp을 사용하고있다
확인 .htaccess 및 .env 파일 –
apache, nginx? 윈도우 서버/리눅스 서버? – ljubadr
'dmb'는 서버의 public_html 아래에있는 폴더입니까? –