什么是选项 +FollowSymLinks? [英] What is Options +FollowSymLinks?

查看:27
本文介绍了什么是选项 +FollowSymLinks?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am using a Lamp server on my computer. I started to use Laravel php framework. In my .htaccess , If I use Options +FollowSymLinks , I get 500 error. And If I comment out , I have to use index.php in my all addresses ..example:

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

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

I use Arch Linux . Is there a way to solve it?

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

edit: I solved this by using virtual hosts. And deleting index.php from application/config/application.php in laravel folder.

推荐答案

您可以尝试在 Internet 上搜索.htaccess Options not allowed here".

You might try searching the internet for ".htaccess Options not allowed here".

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

A suggestion I found (using google) is:

检查以确保您的 httpd.conf 文件具有 AllowOverride All.

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

一个适用于我在 Mint Linux 上的 .htaccess 文件(放置在 Laravel/public 文件夹中):

A .htaccess file that works for me on Mint Linux (placed in the Laravel /public folder):

# 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/) 上提问,那里有一些非常乐于助人的人.

Hope this helps you. Otherwise you could ask a question on the Laravel forum (http://forums.laravel.com/), there are some really helpful people hanging around there.

这篇关于什么是选项 +FollowSymLinks?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆