【问题标题】:laravel internal server errorlaravel 内部服务器错误
【发布时间】:2015-11-09 14:48:41
【问题描述】:

如何在 laravel 4.2 中配置 .htaccess

这是我正在使用的,但我收到内部服务器错误

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

【问题讨论】:

  • Laravel 已经在 public 目录中包含了一个 .htaccess 文件。这有什么问题?
  • 首先检查您的错误日志。

标签: php oop laravel


【解决方案1】:

Laravel 在其文档中提供你想要的所有信息。

http://laravel.com/docs/4.2#pretty-urls

Options +FollowSymLinks
RewriteEngine On

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-04-12
    • 1970-01-01
    • 2014-10-25
    • 2015-08-12
    • 2016-07-10
    • 1970-01-01
    • 1970-01-01
    • 2018-08-01
    相关资源
    最近更新 更多