2016-05-12 19 views
0

MAMA nginxでslim3.xを使用していたときに404エラーが発生しました。 私のroutes/public/index.phpコードはここから:First Application Walkthroughです。 /Applications/MAMP/htdocs/slimpro/routes/public/index.phpMAMP slim nginx 404

enter image description here

と私は 私はこの404エラーを解決するにはどうすればよい/Applications/MAMP/conf/nginx/nginx.conf

server { 

} 

location /slimpro { 
    root /Applications/MAMP/htdocs/slimpro/routes; 
    try_files $uri $uri/ /public/index.php?$query_string; 
} 

を追加します。

私のディレクトリがありますか?

答えて

0

nginxでnginxのconfファイルを編集する必要があります。 Apacheサーバで

if (!-f $request_filename) { 
     rewrite ^(.*)$ /index.php last; 
} 

、あなたが書き換えルールを追加することができconfに

を編集する必要があり

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-F 
RewriteRule . /index.php [L] 
関連する問題