gpt4 book ai didi

php - 什么是选项 +FollowSymLinks?

转载 作者:IT王子 更新时间:2023-10-29 00:13:22 25 4
gpt4 key购买 nike

我在我的电脑上使用 Lamp 服务器。我开始使用 Laravel php 框架。在我的 .htaccess 中,如果我使用 Options +FollowSymLinks ,我会收到 500 错误。如果我注释掉,我必须在所有地址中使用 index.php ..example:

 /~ytsejam/blog/public/index.php/login

我使用 Arch Linux。有办法解决吗?

编辑:我通过使用虚拟主机解决了这个问题。并从 laravel 文件夹中的 application/config/application.php 中删除 index.php。






最佳答案





您可以尝试在互联网上搜索“此处不允许使用 .htaccess 选项”。



我发现的一个建议(使用谷歌)是:




Check to make sure that your httpd.conf file has AllowOverride All.




适用于 Mint Linux 的 .htaccess 文件(位于 Laravel/public 文件夹中):



# Apache configuration file
# http://httpd.apache.org/docs/2.2/mod/quickreference.html

# Turning on the rewrite engine is necessary for the following rules and
# features. "+FollowSymLinks" must be enabled for this to work symbolically.

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
</IfModule>

# For all files not found in the file system, reroute the request to the
# "index.php" front controller, keeping the query string intact

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

希望对您有所帮助。否则你可以在 Laravel 论坛 (http://forums.laravel.com/) 上提问,那里有一些非常乐于助人的人。

关于php - 什么是选项 +FollowSymLinks?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12120035/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com