2016-04-02 12 views
1

新しいLaravelインストールを設定する場合、domain.comの代わりにdomain.com/publicを使用して実行する必要があります。Laravel on Plesk-Server - 電話/公衆からのみアクセス可能

私はこの問題の後にグーグルで、mod_rewriteが有効になっていないことが原因である可能性があることがわかりました。しかし、我々はhttp://download1.parallels.com/Plesk/PP12/12.0/Doc/en-US/online/plesk-administrator-guide/index.htm?fileName=74206.htmで当社のサーバーとそのドキュメント上のPleskを実行していることは言う:

The mod_rewrite module is enabled by default in Apache that comes with Plesk for Linux. To make use of the functionality, you will need to create an .htaccess file containing the desired rewrite rules - refer to the Apache documentation for more information. 

Laravelは私がメインフォルダに公共の内容を移動した場合、正常に動作し、および/ laravelフォルダに残りれる(単にメインのindex.phpファイルを採用する必要があります)。

しかし、元のファイル構造を維持したいと思います。 ヒント?

答えて

0

.htaccessを/ to/publicからリダイレクトするだけです。このような場合もあります。

RewriteCond %{REQUEST_URI} !^public 
RewriteRule ^(.*)$ public/$1 [L] 
関連する問題