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

查看:408
本文介绍了什么是选项+ 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?

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

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

推荐答案

您可以尝试在Internet上搜索此处不允许使用.htaccess选项".

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

我发现(使用Google)的建议是:

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天全站免登陆